Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disabling Events: Dangerous?
I think I have this one sussed, but wanted to check that there are no
unexpected side-effects! I have a workbook, which contains several macros. One of which is triggered by the Workbook_Open event to 'initialise' the worksheets before the user begins to change it. During the initialisation, the Workbook_Open macro makes changes which trigger other event macros, most of which mess up the sheet if they run during the initialisation. I assume that the following will stop any other macros running before the Workbook_Open macro has stopped: Application.EnableEvents = False 'initialize the Worksheets Application.EnableEvents = True But is there anything I've overlooked that might mess other things up? Thanks for your help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Disabling Events: Dangerous?
It sure seems like a reasonable approach to me.
But I think the way you really find out if there's other problems is by testing the heck out of it. JakeyC wrote: I think I have this one sussed, but wanted to check that there are no unexpected side-effects! I have a workbook, which contains several macros. One of which is triggered by the Workbook_Open event to 'initialise' the worksheets before the user begins to change it. During the initialisation, the Workbook_Open macro makes changes which trigger other event macros, most of which mess up the sheet if they run during the initialisation. I assume that the following will stop any other macros running before the Workbook_Open macro has stopped: Application.EnableEvents = False 'initialize the Worksheets Application.EnableEvents = True But is there anything I've overlooked that might mess other things up? Thanks for your help. -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Dangerous fillcolor change, saving 2007 to 97-2003 | Excel Discussion (Misc queries) | |||
Disabling Events | Excel Programming | |||
Prevent user disabling events | Excel Programming | |||
Disabling/enabling events with a button created by code?? | Excel Programming | |||
Disabling Events | Excel Programming |