#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Toggle Code


Sub ToggleHidingColA()
' TOGGLE BETWEEN HIDING AND UNHIDING ROWS
Rows ("10:32").Hidden = Not (Rows("10:32").Hidden)
End Sub

The above code allows a macro button to toggle Hide/Unhide of Rows 10
to 32 incl.

If Rows 10 to 32 are indentified with a Named Range of 'Level01', how
is the above code ammended to show the Named Range not the row
numbers???

This must be simple, but I'm missing it somewhere!!!!


--
thunderfoot
------------------------------------------------------------------------
thunderfoot's Profile: http://www.excelforum.com/member.php...o&userid=17341
View this thread: http://www.excelforum.com/showthread...hreadid=470808

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Toggle Code

Sub ToggleHidingColA()
' TOGGLE BETWEEN HIDING AND UNHIDING ROWS
Range("Level01").EntireRow.Hidden = _
Not (Range("Level01").EntireRow.Hidden)
End Sub

--
Regards,
Tom Ogilvy

"thunderfoot"
wrote in message
...

Sub ToggleHidingColA()
' TOGGLE BETWEEN HIDING AND UNHIDING ROWS
Rows ("10:32").Hidden = Not (Rows("10:32").Hidden)
End Sub

The above code allows a macro button to toggle Hide/Unhide of Rows 10
to 32 incl.

If Rows 10 to 32 are indentified with a Named Range of 'Level01', how
is the above code ammended to show the Named Range not the row
numbers???

This must be simple, but I'm missing it somewhere!!!!


--
thunderfoot
------------------------------------------------------------------------
thunderfoot's Profile:

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Toggle Code

Won't this work?

Range("level01").Rows.Hidden = Not (Range("level01").Rows.Hidden)

Bob L.






"thunderfoot"
wrote in message
...

Sub ToggleHidingColA()
' TOGGLE BETWEEN HIDING AND UNHIDING ROWS
Rows ("10:32").Hidden = Not (Rows("10:32").Hidden)
End Sub

The above code allows a macro button to toggle Hide/Unhide of Rows 10
to 32 incl.

If Rows 10 to 32 are indentified with a Named Range of 'Level01', how
is the above code ammended to show the Named Range not the row
numbers???

This must be simple, but I'm missing it somewhere!!!!


--
thunderfoot
------------------------------------------------------------------------
thunderfoot's Profile:
http://www.excelforum.com/member.php...o&userid=17341
View this thread: http://www.excelforum.com/showthread...hreadid=470808



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
Command button to toggle worksheet event code on / off? Fred[_2_] Excel Discussion (Misc queries) 15 July 31st 07 11:50 AM
How do i setup a 'toggle' Tedwards Excel Discussion (Misc queries) 2 February 28th 06 09:11 AM
toggle button & event code Bob Umlas[_3_] Excel Programming 0 April 14th 05 08:22 PM
Can I toggle this Code - to Stamp and to UnStamp? JMay Excel Programming 1 January 9th 04 12:47 PM
How to toggle Cesar Zapata[_2_] Excel Programming 3 November 15th 03 01:13 AM


All times are GMT +1. The time now is 10:17 AM.

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"