#1   Report Post  
Posted to microsoft.public.excel.misc
John
 
Posts: n/a
Default Check Box

I currently have two buttons. One that will show the hidden rows, the other
that will hide them again. However, i would rather change the two buttons to
a check box. So if the check box is "Checked" it will show the hidden cells,
but if it is unchecked it will hide the cells again. I assume that is
possible.
  #2   Report Post  
Posted to microsoft.public.excel.misc
broro183
 
Posts: n/a
Default Check Box


Hi John,

Here's some code for a check box (originally sourced from Aaron Blood's
highlight.zip file at http://www.xl-logic.com/pages/vba.html):

Private Sub CheckBox1_Click()
If Sheets(1).CheckBox1 Then
'code for hiding rows
else
'code for unhiding rows
End If
End Sub

Nb: depending on your preference/caption in your check box, it may be
better around the other way.

Or another option is just to turn one of your two buttons into a toggle
& delete the other one. Have a look at thread below for ideas to adapt:
http://excelforum.com/showthread.php...=toggle+button

hth
Rob Brockett
NZ
Always learning & the best way to learn is to experience...


--
broro183
------------------------------------------------------------------------
broro183's Profile: http://www.excelforum.com/member.php...o&userid=30068
View this thread: http://www.excelforum.com/showthread...hreadid=535769

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
... Can I set Spell Check to automatically check my spelling ... Dr. Darrell Setting up and Configuration of Excel 0 March 21st 06 08:26 PM
Entry into check box dependent on other check box. Stilla Excel Worksheet Functions 9 December 10th 05 03:44 PM
Can you sort with check boxes? Q Excel Discussion (Misc queries) 3 November 10th 05 08:11 PM
check boxes - copy MarkT Excel Discussion (Misc queries) 2 October 20th 05 04:33 PM
Creating a check box that does not require security clearance. Maverick2U Excel Worksheet Functions 6 December 14th 04 02:46 AM


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