Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default Hide/Unhide 10 consecutive rows down

I have gone through previous posts but could not get the correct/similar code
for:-
1.when command button(1) is clicked, 10 rows down (if hidden) from an
active cell should be unhidden i.e. if B4 is active cell, rows 5 to 14
should be unhidden
2.when command button(2) is clicked, 10 rows down (if not hidden) from a
active cell should be hidden i.e. if B40 is the active cell, rows 41 to 50
should be hidden.
Would appreciate assistance
--
Robert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 718
Default Hide/Unhide 10 consecutive rows down

sub CommandButton1_Click()
activecell.offset(1,0).resize(10).Entirerow.Hidden = False
end sub

sub CommandButton2_Click()
activecell.offset(1,0).resize(10).Entirerow.Hidden =True
end sub

HTH
--
AP

"Robert" a écrit dans le message de
...
I have gone through previous posts but could not get the correct/similar

code
for:-
1.when command button(1) is clicked, 10 rows down (if hidden) from an
active cell should be unhidden i.e. if B4 is active cell, rows 5 to 14
should be unhidden
2.when command button(2) is clicked, 10 rows down (if not hidden) from a
active cell should be hidden i.e. if B40 is the active cell, rows 41 to 50
should be hidden.
Would appreciate assistance
--
Robert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 113
Default Hide/Unhide 10 consecutive rows down

Ardus Petus, Thank you very much for the codes.
Implemented and working.
--
Robert



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
Enabling option „Format rows“ to hide/unhide rows using VBA-code? ran58 Excel Discussion (Misc queries) 0 July 28th 09 03:46 PM
Hide Unhide Rows blackstar Excel Discussion (Misc queries) 2 February 6th 06 09:36 PM
Hide/Unhide Rows Al Excel Programming 3 January 18th 06 07:03 PM
Hide/Unhide rows lennyx2 Excel Programming 3 May 24th 05 07:11 PM
How to hide and unhide rows Michael168[_10_] Excel Programming 1 October 6th 03 11:52 AM


All times are GMT +1. The time now is 11:08 AM.

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

About Us

"It's about Microsoft Excel"