Another perhaps. At the start of the code:
If ActiveSheet.Name < "Sheet2" Then Exit Sub
or you could have something like:
If ActiveSheet.Name < "Sheet2" Then
MsgBox "This Macro only works in Sheet2", , "Marcus Software"
Exit Sub
End If
--
HTH
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
Replace @mailinator.com with @tiscali.co.uk
"Marcus Analyst" wrote in message
...
A macro I have written hides rows in one sheet. However, it also is hiding
the same rows in a different sheet. How do I get a macro to run in only
one
sheet?
--
Marc