I did check that one but it's for disabling a checkbox based on another checkbox. Can the code be amended to disable it if A1="No"?I'm using form controls.Check below thread. This should give you a clue how to disable the checkbox. Always check if there was already solution to your treadhttp://www.mrexcel.com/forum/excel-questions/420586-disable-checkbox-visual-basic-applications.html
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ctlCheckBox As CheckBox
With Me
Set ctlCheckBox = .CheckBoxes(1) '-- assume it is the 1st checkbox, you can also refer to it by its name
ctlCheckBox.Enabled = Not .Range("A1").Value = "No"
End With
End Sub
Code:Sub Disable() If Cells(55, 7) = "No" Then CheckboxAirSus.Enabled = False End Sub
Tried the above and get a object required error?
For example, the sheet change event:
Code:Private Sub Worksheet_Change(ByVal Target As Range) Dim ctlCheckBox As CheckBox With Me Set ctlCheckBox = .CheckBoxes(1) '-- assume it is the 1st checkbox, you can also refer to it by its name ctlCheckBox.Enabled = Not .Range("A1").Value = "No" End With End Sub
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ctlCheckBox As CheckBox
With Me
Set ctlCheckBox = .CheckBoxes(CheckboxAirSus)
ctlCheckBox.Enabled = Not .Range("G55").Value = "No"
End With
End Sub