Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enabling/Disabling Macros w/o closing & re-opening
Hello all,
Is there a way to enable and disable macros without having to close the file and re-open it? One of the files that my boss has designed has macros running when you switch from tab to tab, making it impossible to copy-&-paste from sheet to sheet. I would like to be able to disable macros, do my copy & paste, and then re-enable macros without having to close my file. Is this possible? -- Thanks for any help anyone can provide, Conan Kelly |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Enabling/Disabling Macros w/o closing & re-opening
What you could do would be to disable event (keeping the code from running
when you switch from tab to tab. You could then do your copying and pasting without issue. The code to turn off events is this (which you could attach to a button) sub DisableEvents application.enableevents = false end sub sub ReEnableEvents application.enableevents = true end sub You MUST MUST MUST make sure to re-eneable events when you are finished, otherwise events will be PERMANENTLY disabled on your machine until you run code to switch the events back. Nothing including rebooting will not turn the events back on. Only code. -- HTH... Jim Thomlinson "Conan Kelly" wrote: Hello all, Is there a way to enable and disable macros without having to close the file and re-open it? One of the files that my boss has designed has macros running when you switch from tab to tab, making it impossible to copy-&-paste from sheet to sheet. I would like to be able to disable macros, do my copy & paste, and then re-enable macros without having to close my file. Is this possible? -- Thanks for any help anyone can provide, Conan Kelly |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disabling formula recalculation when opening or closing workbooks | Excel Discussion (Misc queries) | |||
Userforms: Disabling - Enabling the X | Excel Programming | |||
Opening a file and enabling macros automatically | Excel Discussion (Misc queries) | |||
Disabling/Enabling Macros | Excel Programming | |||
Enabling/Disabling Macros | Excel Programming |