Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default hide/unhide macro


Can someone help me design a hide/unhide macro that I can attach to a
button? I'm looking to create a macro that will allow me to hide the
contents of two specific cells (or rows if need be) at the click of a
button...and then unhide them again at the click of the same button.
So far, I've been successful at hiding these two rows at the click of a
button but not unhide them. Here's what I had so far:

ActiveWindow.SmallScroll Down:=50
Range("C66:M67,C75:M76").Select
Range("C75").Activate
Selection.EntireRow.Hidden = True
End Sub

Thank you


--
zenahs
------------------------------------------------------------------------
zenahs's Profile: http://www.excelforum.com/member.php...o&userid=28681
View this thread: http://www.excelforum.com/showthread...hreadid=484013

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default hide/unhide macro

Sub HideUnhide
Rows("10:11").Hidden = Not Rows("10:11").Hidden
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"zenahs" wrote in
message ...

Can someone help me design a hide/unhide macro that I can attach to a
button? I'm looking to create a macro that will allow me to hide the
contents of two specific cells (or rows if need be) at the click of a
button...and then unhide them again at the click of the same button.
So far, I've been successful at hiding these two rows at the click of a
button but not unhide them. Here's what I had so far:

ActiveWindow.SmallScroll Down:=50
Range("C66:M67,C75:M76").Select
Range("C75").Activate
Selection.EntireRow.Hidden = True
End Sub

Thank you


--
zenahs
------------------------------------------------------------------------
zenahs's Profile:

http://www.excelforum.com/member.php...o&userid=28681
View this thread: http://www.excelforum.com/showthread...hreadid=484013



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 168
Default hide/unhide macro

Sub HideUnhideRow()
If Range("A1").EntireRow.Hidden = True Then Range("A1").EntireRow.Hidden =
False Else: Range("A1").EntireRow.Hidden = True
End Sub

"zenahs" wrote in
message ...

Can someone help me design a hide/unhide macro that I can attach to a
button? I'm looking to create a macro that will allow me to hide the
contents of two specific cells (or rows if need be) at the click of a
button...and then unhide them again at the click of the same button.
So far, I've been successful at hiding these two rows at the click of a
button but not unhide them. Here's what I had so far:

ActiveWindow.SmallScroll Down:=50
Range("C66:M67,C75:M76").Select
Range("C75").Activate
Selection.EntireRow.Hidden = True
End Sub

Thank you


--
zenahs
------------------------------------------------------------------------
zenahs's Profile:
http://www.excelforum.com/member.php...o&userid=28681
View this thread: http://www.excelforum.com/showthread...hreadid=484013



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
Macro that will unhide then hide rows minka Excel Discussion (Misc queries) 10 October 21st 06 01:37 PM
hide/unhide macro Matt Excel Discussion (Misc queries) 2 April 6th 06 07:24 PM
Macro to hide or unhide columns Chance224 Excel Programming 1 February 14th 05 09:34 PM
Macro that will always hide / unhide next column Kirby[_3_] Excel Programming 2 June 7th 04 10:21 PM
Hide/Unhide Macro bug Dave[_28_] Excel Programming 1 September 4th 03 06:26 PM


All times are GMT +1. The time now is 12:59 PM.

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"