Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Button Enabling based on check in checkbox
I have CheckBox1 and TextBox1 on a UserForm. The goal is
to only enable Textbox1 to be typed in only if checkbox1 has a check in it. I would like to achieve this by using an IF THEN statement. All Responses are welcome. Thank you in advance. Todd Huttenstine |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Button Enabling based on check in checkbox
Todd chose:
Private Sub CheckBox1_Click() If Checkbox1.Value = True Then Textbox2.Enabled = True Else Textbox2.Enabled = False End If End Sub in lieu of Private Sub CheckBox1_Click() Me.TextBox1.Enabled = CBool(Me.CheckBox1.Value) End Sub -- Regards, Tom Ogilvy Todd Huttenstine wrote in message ... I have CheckBox1 and TextBox1 on a UserForm. The goal is to only enable Textbox1 to be typed in only if checkbox1 has a check in it. I would like to achieve this by using an IF THEN statement. All Responses are welcome. Thank you in advance. Todd Huttenstine |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Button Enabling based on check in checkbox
Hello Todd,
Give this a try: Private Sub UserForm_Initialize() 'This will set the default value Me.CheckBox1.Value = False Me.TextBox1.Enabled = False End Sub Private Sub CheckBox1_Click() If Me.CheckBox1.Value = True Then Me.TextBox1.Enabled = True Else Me.TextBox1.Enabled = False End If End Sub Regards, Jon-jon "Todd Huttenstine" wrote in message ... I have CheckBox1 and TextBox1 on a UserForm. The goal is to only enable Textbox1 to be typed in only if checkbox1 has a check in it. I would like to achieve this by using an IF THEN statement. All Responses are welcome. Thank you in advance. Todd Huttenstine |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Enabling Spell Check in Protected Worksheet | Excel Discussion (Misc queries) | |||
Enabling voting button | Excel Discussion (Misc queries) | |||
check a checkbox in a formula | Excel Worksheet Functions | |||
Conditional Button Enabling based on Checkbox | Excel Programming | |||
Can't check ActiveX checkbox on worksheet | Excel Programming |