I want to click a check box and have another linked check box be disabled in Excel.
When I uncheck that particular check box, then the disabled check box should become enabled.
I tried so many things but not able to find the solution. Can I do this without a script?
I have 76 check boxes to work upon. So is this possible without a script? TIA
With two ActiveX check boxes the code would be:
Private Sub CheckBox1_Click()
If CheckBox2.Enabled = True Then
CheckBox2.Enabled = False
Else:
CheckBox2.Enabled = True
End If
End Sub
It's simple, but works.
If you want the code to check and disable clicking on the second box, use the below code. If you uncheck the initial box, it will also enable and uncheck the second one.
Private Sub CheckBox1_Click()
If CheckBox1.Value = True Then
CheckBox2.Value = True
CheckBox2.Enabled = False
Else
CheckBox2.Value = False
CheckBox2.Enabled = True
End If
End Sub
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With