Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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


.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hide row code help Jeremy Excel Discussion (Misc queries) 1 January 5th 10 06:23 PM
Hide Code Stockwell43 Excel Discussion (Misc queries) 3 January 12th 09 07:05 PM
hide code does not hide Wanna Learn Excel Discussion (Misc queries) 2 March 6th 08 07:21 PM
Hide VBA code help GerryK Excel Worksheet Functions 3 May 30th 07 09:47 PM
Hide Code tannersnonni Excel Discussion (Misc queries) 0 July 28th 05 01:06 AM


All times are GMT +1. The time now is 11:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"