View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default 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