View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Miller Dave Miller is offline
external usenet poster
 
Posts: 72
Default Macro to run when sheet activated

Try this:

David Miller

================================================== ================

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If Sh.Name = "Trigger" Then
If Sheets("A").vibible = True And Sheets("B").Visible = True And
Sheets("C").Visible = True Then
Sheets("A").Visible = True
Sheets("B").Visible = True
Sheets("C").Visible = True
Else
Sheets("A").Visible = True
Sheets("B").Visible = True
Sheets("C").Visible = True
End If
End Sub