View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
CLR CLR is offline
external usenet poster
 
Posts: 1,998
Default Apply macro to one sheet only

Gary's Student just showed you.............insert this line above your "Hide
rows" line
substituting your sheet name for "Sheet2"

Sheets("Sheet2").Activate


Vaya con Dios,
Chuck, CABGx3



"Marcus Analyst" wrote:

Here is the code:

Sub Auto_Open()
'
' Auto_Open Macro
' Hides rows 10-28 (Steps 2 and 3)
'
' Keyboard Shortcut: Ctrl+x
'
Rows("10:26").Select
Selection.EntireRow.Hidden = True
End Sub
--
Marc


"CLR" wrote:

Post your code, someone will help..........

Vaya con Dios,
Chuck, CABGx3



"Marcus Analyst" wrote:

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