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

Hi,

I have a form with a checkbox and then two textboxes that are associated
with the checkbox. So I want to make the checkboxes unshaded when the
checkbox is selected and "shaded" when the checkbox is not checked. I have
seen this before in forms. I tried using the "visible" property but this
makes the entire box disappear, and I only want it "shadded"

Has anyone done something like this before - do you know what property to use.

Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
Toppers
 
Posts: n/a
Default Check Box

Jeff,
Would this suffice? If so, you probably want to put the ELSE code
in the Userform_Initialize routine.

Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
TextBox1.Enabled = True
TextBox2.Enabled = True
TextBox1.BackColor = &H8000000F
TextBox2.BackColor = &H8000000F
Else
TextBox1.Enabled = False
TextBox2.Enabled = False
TextBox1.BackColor = &H80000011
TextBox2.BackColor = &H80000011
End If

End Sub

"Jeff" wrote:

Hi,

I have a form with a checkbox and then two textboxes that are associated
with the checkbox. So I want to make the checkboxes unshaded when the
checkbox is selected and "shaded" when the checkbox is not checked. I have
seen this before in forms. I tried using the "visible" property but this
makes the entire box disappear, and I only want it "shadded"

Has anyone done something like this before - do you know what property to use.

Thanks

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
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
How do I use a check box to accept a calculation Joejoethecrackman Excel Discussion (Misc queries) 5 March 22nd 05 08:47 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 09: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"