View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
L. Howard L. Howard is offline
external usenet poster
 
Posts: 852
Default Change event for all sheets in WBook

This works to hide/unhide for only the activesheet.

I need if I enter CS or SA on ANY sheet cell H8, then ALL sheets hide for that case, regardless what the other sheets display in cell H8.

A BOOLEAN ??? for all sheets to toggle from hide/unhide from the entry on any single sheet.

Thanks,
Howard


Option Explicit
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)

If Target.Address < "$H$8" Then Exit Sub
If Target.Count 1 Then Exit Sub

Select Case Range("H8").Value

Case Is = "CS"
Rows("23:28").EntireRow.Hidden = True

Case Is = "SA"
Rows("23:28").EntireRow.Hidden = False

End Select

End Sub