Thread: Making macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Making macro

Private Sub Worksheet_Activate()
Worksheets("Sheet1").Visible = xlSheetHidden
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the Sheet2 worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.



--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"George A. Jululian" <George A. wrote in
message ...
To make a macro that if I selected sheet2 , sheet1 hide