Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / March 2006

Tip: Looking for answers? Try searching our database.

Hide/Unhide 10 consecutive rows down

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Robert - 24 Mar 2006 09:21 GMT
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
Signature

Robert

Ardus Petus - 24 Mar 2006 09:56 GMT
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

> I have gone through previous posts but could not get the correct/similar code
> for:-
[quoted text clipped - 5 lines]
> should be hidden.
> Would appreciate assistance
Robert - 24 Mar 2006 10:17 GMT
Ardus Petus, Thank you very much for the codes.
Implemented and working.
Signature

Robert

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.