Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
diable macro if a certain sheet is active
How can I disable a macro from running if a certain sheet is active.
example if sheet "new" is active I can run a macro that will hide certain rows if sheet "old" is active the same macro will not be able to hide the rows in the macro any ideas?? -- crunchin numbers |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
diable macro if a certain sheet is active
Add the following line at the beginning of the macro
If ActiveSheet.Name = "old" then Exit Sub -- If this helps, please click the Yes button. Cheers, Shane Devenshire "belvy123" wrote: How can I disable a macro from running if a certain sheet is active. example if sheet "new" is active I can run a macro that will hide certain rows if sheet "old" is active the same macro will not be able to hide the rows in the macro any ideas?? -- crunchin numbers |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
diable macro if a certain sheet is active
Add the below at the beginning of the marco.
If ActiveSheet.Name < "New" then Exit Sub If this post helps click Yes --------------- Jacob Skaria "belvy123" wrote: How can I disable a macro from running if a certain sheet is active. example if sheet "new" is active I can run a macro that will hide certain rows if sheet "old" is active the same macro will not be able to hide the rows in the macro any ideas?? -- crunchin numbers |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
diable macro if a certain sheet is active
Your question leaves out a detail that I think is necessary for us to
know... what if the rows are already hidden and the "old" sheet is made active... should the code unhide the rows in that situation? In order to get a better answer, you should post your code so we can tell you how to change it to do what you want. -- Rick (MVP - Excel) "belvy123" wrote in message ... How can I disable a macro from running if a certain sheet is active. example if sheet "new" is active I can run a macro that will hide certain rows if sheet "old" is active the same macro will not be able to hide the rows in the macro any ideas?? -- crunchin numbers |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
emailing active sheet with macro | Excel Worksheet Functions | |||
macro active sheet | Excel Discussion (Misc queries) | |||
list sheet names vertically below the active cell - need macro. | Excel Worksheet Functions | |||
copy name from active sheet to cell - using macro or function | Excel Worksheet Functions | |||
How to change macro so it performs actions on ACTIVE sheet? | Excel Discussion (Misc queries) |