Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Think I misread your question. As OssieMac suggests use the events exposed
in the ThisWorkbook module, if necessary include some If or Select case to cater for different 'set's of sheets. Regards, Peter T "Peter T" <peter_t@discussions wrote in message ... Change Private to Public, eg Public Sub Worksheet_Change(ByVal Target As Range) and to call it from elsewhere in your project, eg Sheet1.Worksheet_Change Range("A1") Worksheets("Sheet1").Worksheet_Change Range("A1") Unless you are certain Sheet1 will never be deleted, call with Worksheets("Sheet1"). Whilst this should work, I think a better way would be to move the bulk of the event code to a normal module, eg Sub wsChange(ws As Worksheet, Target As Range) ' code End Sub from the worksheet event call it like this Private Sub Worksheet_Change(ByVal Target As Range) wsChange Me, Target End Sub Call it similarly from anywhere else but change 'Me' to [say] ActiveSheet Regards, Peter T "avi" wrote in message ... Hello, Is there a way to trigger a worksheet_change event from code placed in a regular module and not in the sheet itself? Or what is the approach to trigger a worksheet change event when I don't know in advance which sheet will be involved and don't want to insert code at each created sheet? Thanks a lot Avi |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Worksheet_Change does it fire for a cell changed via foruma? | Excel Programming | |||
event fire | Excel Programming | |||
Can't get Sheet_Change event to fire - please help | Excel Programming | |||
Event doesn't fire | Excel Discussion (Misc queries) | |||
Worksheet_Change event won't fire to execute Macro??? | Excel Programming |