Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet Change from Add-In
Yes it is possible but your addin will be listneing to all open workbooks and
all sheets witning those workbooks. your addin will need to determine which sheet in which book the change is being made in. Here is a link to application level events that will allow your addin to listen to events generated in all open workbooks... http://www.cpearson.com/excel/AppEvent.aspx -- HTH... Jim Thomlinson "scott" wrote: I have the below code behind "Sheet1". I have an add-in that loads whenever this particular workbook opens and I always try to keep my code within the ..xla add-in file. Because one of my needs for this workbook is to take action if the values change in A:2 or B:2, I have the code below in the "Sheet1" Worksheet_Change sub. Is there any code that could be used in the add-in that would achieve the same task of monitoring cells A2 and B2 for change, but reside in the .xla add-in instead of in the Worksheet_Change sub within "Sheet1"? CODE: Private Sub Worksheet_Change(ByVal Target As Range) Select Case Target.Address Case Is = "$A$2" ' Do something ... Case Is = "$B$2" ' Do something ... End Select End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
how to change the pivot chart automaticaly as values in the worksheet change | Excel Worksheet Functions | |||
change formula in a shared worksheet without losing change history | Excel Worksheet Functions | |||
Change in one Worksheet Activates Another Worksheet Change | Excel Programming | |||
Cell value change to trigger macro (worksheet change event?) | Excel Programming | |||
Change Cell from Validated List Not Firing Worksheet Change Event | Excel Programming |