You would need to build a class module in the add-in to trap application
events, and trap the Application_SheetChange event. As usual, Chip Pearson
provides decent coverage of this topic:
http://cpearson.com/excel/AppEvent.aspx
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. -
http://PeltierTech.com
_______
"scott" wrote in message
...
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