Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Worksheet Change from Add-In
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 |
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 |