#1   Report Post  
Dave_2k5
 
Posts: n/a
Default Toggle Button


Hi all,

I am looking a putting a VB command button on one of my sheets, which
when pressed once it does one thing, then when pressed again it does
something different.

e.g. when pressed first time it hides a range of rows, when pressed
again it unhides them.

Hope you can help

Dave


--
Dave_2k5
------------------------------------------------------------------------
Dave_2k5's Profile: http://www.excelforum.com/member.php...o&userid=19667
View this thread: http://www.excelforum.com/showthread...hreadid=401062

  #2   Report Post  
dominicb
 
Posts: n/a
Default


You will find an answer in your other post.

Please do not post to multiple categories - your question will get seen
whichever category it is in.

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=401062

  #3   Report Post  
Bob Phillips
 
Posts: n/a
Default

Here is a macro that you can assign to a forms toolbar button

Sub myMacro()
Static fOn As Boolean

fOn = Not fOn
Rows("1:3").Hidden = fOn

End Sub


--

HTH

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


"Dave_2k5" wrote in
message ...

Hi all,

I am looking a putting a VB command button on one of my sheets, which
when pressed once it does one thing, then when pressed again it does
something different.

e.g. when pressed first time it hides a range of rows, when pressed
again it unhides them.

Hope you can help

Dave


--
Dave_2k5
------------------------------------------------------------------------
Dave_2k5's Profile:

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



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
toggle button text color John Davies Excel Discussion (Misc queries) 5 December 12th 05 06:43 PM
Place the caption of a toggle button into a cell [email protected] Excel Worksheet Functions 2 May 12th 05 04:47 AM
Command Button anomalies RWN Excel Discussion (Misc queries) 5 May 4th 05 05:09 AM
Command Button VBA code Dave Peterson Excel Discussion (Misc queries) 2 January 25th 05 11:28 PM
Toggle betwen "editing" and "pushing" a button in excel brjohnson9 Excel Discussion (Misc queries) 1 December 9th 04 12:02 AM


All times are GMT +1. The time now is 09:00 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"