Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 82
Default Checkbox checked then show more checkboxes

I have added checkboxes from Control Toolbox and they seem to work fine. I
just want to make one of them lets say checkbox3 to show more checkboxes when
checkbox3 is marked. How do I do that?
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default Checkbox checked then show more checkboxes

I'd add them all to exactly where I wanted them.

But then have the "master" checkbox just unhide/hide the others.

Option Explicit
Private Sub CheckBox3_Click()
Dim ShouldBeVisible As Boolean

ShouldBeVisible = CBool(Me.CheckBox3.Value = True)

Me.CheckBox1.Visible = ShouldBeVisible
Me.CheckBox2.Visible = ShouldBeVisible
Me.CheckBox4.Visible = ShouldBeVisible
Me.CheckBox5.Visible = ShouldBeVisible
End Sub

Sara wrote:

I have added checkboxes from Control Toolbox and they seem to work fine. I
just want to make one of them lets say checkbox3 to show more checkboxes when
checkbox3 is marked. How do I do that?


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 82
Default Checkbox checked then show more checkboxes

Thanks Dave. That works perfectly.

I also want to tie the same checkbox (checkbox3) to hide the values in cell
B41 and B45 if it is checked. Is their a way to just hide the cell text
rather than hidding the entire row or a column? I am not sure how to write
the code for a specific cell.
  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 35,218
Default Checkbox checked then show more checkboxes

You can make the cell look empty in the worksheet (not in the formula bar).

You could use the same font color as fill color (white on white) or use a custom
format of:
;;;
(3 semicolons)

me.range("b41,b45").numberformat = ";;;"
and to see it:
me.range("b41,b45").numberformat = "General"


Sara wrote:

Thanks Dave. That works perfectly.

I also want to tie the same checkbox (checkbox3) to hide the values in cell
B41 and B45 if it is checked. Is their a way to just hide the cell text
rather than hidding the entire row or a column? I am not sure how to write
the code for a specific cell.


--

Dave Peterson
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
Using checkboxes, can I write formulas based on what is checked? Liz Excel Worksheet Functions 2 March 14th 08 11:32 PM
How to have Checkbox A uncheck with checked Checkbox B Texas Aggie Excel Discussion (Misc queries) 3 July 20th 07 10:58 PM
Print a selection based on checked checkboxes Stefan van der Hooft Excel Worksheet Functions 0 May 2nd 07 09:34 AM
Sum Only Checked Checkboxes Beamers Excel Discussion (Misc queries) 3 October 23rd 06 10:52 PM
My checkboxes will not stay checked. NUMBnut Excel Discussion (Misc queries) 0 January 9th 06 09:01 PM


All times are GMT +1. The time now is 11:41 PM.

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"