View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Shane Devenshire[_2_] Shane Devenshire[_2_] is offline
external usenet poster
 
Posts: 3,346
Default 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