View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Reset to full rows visible

Trying the sub below from a Mike H post
How do I reset it to full rows visible if I were to click on a cell other
than A1 or A2?

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Select Case Target.Address
Case Is = ("$A$1")
Rows("10:20").EntireRow.Hidden = True
Rows("21:40").EntireRow.Hidden = False
Case Is = ("$A$2")
Rows("10:20").EntireRow.Hidden = False
Rows("21:40").EntireRow.Hidden = True
End Select
End Sub