Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn off ThisWorkbook Code?
Is there any way that I can prevent ThisWorkbook code from working
while I am running some public sub? I have a Workbook_SheetChange procedure in ThisWorkbook, but I don't want it to run while my other procedure is changing cells. Thank you |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn off ThisWorkbook Code?
Well, I can create a public variable = True while the module sub is
being run and check if it's True within Workbook_SheetChange sub. It works ok, but I am just curious if there is anything that would actually turn off ThisWorkbook code? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn off ThisWorkbook Code?
You can turn off events (like the _SheetChange etc), but this depends on
whether you other code requires events. Appilcation.EnableEvents = False 'Code... 'Turn back on when finished Appilcation.EnableEvents = True Otherwise set a Public boolean and test that at the beginning of each routine that should/should not run. NickHK wrote in message ups.com... Is there any way that I can prevent ThisWorkbook code from working while I am running some public sub? I have a Workbook_SheetChange procedure in ThisWorkbook, but I don't want it to run while my other procedure is changing cells. Thank you |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Turn off ThisWorkbook Code?
Thank you, NickHK! That is exactly what I was asking for.
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Inserting Code within ThisWorkbook via Code Q | Excel Programming | |||
Populate ThisWorkbook via Code | Excel Programming | |||
Deleting Code in 'ThisWorkbook' | Excel Programming | |||
Code to automatically turn on and turn off Track Changes | Excel Programming | |||
Delete the code in ThisWorkbook | Excel Programming |