SmartTags and events in Excel

Add-in Express™ Support Service
That's what is more important than anything else

SmartTags and events in Excel
 
Yuri Astrakhan


Guest


Hi. I am researching a way to bring up a dialog box for a cell containing specific data, and also to detect when that cell changes in Excel 2002+. What would be the best way to do that?

Example:

-- User has a function in the spreadsheet "=TestFunc(1,2)". I would like to either use SmartTag or inject a context menu item to ANY cells that contain that formula. (ADX only matches values). The click on the item/menu brings up a dialog box allowing the user to change the formula of that cell. The user should not be able to remove that smartTag from excel unless the application is uninstalled.

-- I would also like to get notified when the cell containing that formula gets changed or deleted, or the worksheet closes. I think the worksheet closing is easily detected, but the cell formula alteration event I did not find.

Thanks for you great work!
--Yuri
Posted 24 Apr, 2006 18:09:58 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Yuri.

I think your idea can be implemented via a COM add-in. If the COM add-in is registered for all users, it is not visible in the COM Add-ins dialog and the user will not be able to disable it.
To display the dialog for an appropriate cell you need to add a new item to the Cell context menu in Excel.
The Selection property of Excel application and SelectionChange event will help you to get the selected range in the active worksheet.
To detect any changes within a worksheet you can use the SheetChange event of the ADXExcelAppEvents component.
Posted 25 Apr, 2006 10:50:36 Top