View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default How to hide row range from code?

Dim StartRow As Long
Dim EndRow As Long
StartRow = 10
EndRow = 12
Rows(StartRow & ":" & EndRow).Hidden = _
Not Rows(StartRow).Hidden

--
Regards,
Tom Ogilvy

wrote in message
...
Jim this seems to solve half of my problem! If I am using
the toggle button, what would the code be to allow the
first click to unhide the rows and then the second click
to hide the rows. The code below hides.

Janice
-----Original Message-----
Maybe this will help a little:

Dim StartRow As Long
Dim EndRow As Long
StartRow = 10
EndRow = 12
Rows(StartRow & ":" & EndRow).Hidden = True


--
Jim Rech
Excel MVP


.