Shweta
Well-known Member
- Joined
- Jun 5, 2011
- Messages
- 514
Hello All,
I have a userform with 3 checkboxes. When userform initializes only one checkbox (checkbox1) is enabled and rest two are disabled. I want when user check(select) the checkbox1 then only other two checkboxes get enabled and when user check again (deselect) the checkbox1 then other two checkboxes get disabled again.
Using the following code but it is not working to make the checkboxes disabled again.
I tried with other events also like change() and click() but facing same problem.
Thanks in advance!
Regards,
Shweta Jain
I have a userform with 3 checkboxes. When userform initializes only one checkbox (checkbox1) is enabled and rest two are disabled. I want when user check(select) the checkbox1 then only other two checkboxes get enabled and when user check again (deselect) the checkbox1 then other two checkboxes get disabled again.
Using the following code but it is not working to make the checkboxes disabled again.
Code:
Private Sub CheckBox1_AfterUpdate()
If Me.CheckBox1.Enabled = True Then
Me.CheckBox2.Enabled = True
Me.CheckBox3.Enabled = True
ElseIf Me.CheckBox1.Enabled = False Then
Me.CheckBox2.Enabled = False
Me.CheckBox3.Enabled = False
End If
End Sub
I tried with other events also like change() and click() but facing same problem.
Thanks in advance!
Regards,
Shweta Jain