Basically, I have a little loop, that that sets all CheckBoxes to true or False based on the value of an OptionButton.
Works great except that it also meets the IF condition for the option buttons, even though I specifically wrote that I want CheckBox Values to change.
Am I missing anything obvious?
Works great except that it also meets the IF condition for the option buttons, even though I specifically wrote that I want CheckBox Values to change.
Am I missing anything obvious?
Code:
Dim ctrl As MSForms.Control
If Me.OptionButton1.value = True Then
For Each ctrl In UserForm6.Controls
If TypeOf ctrl Is MSForms.CheckBox Then
ctrl.value = False
End If
Next ctrl
Exit Sub
ElseIf Me.OptionButton2.value = True Then
For Each ctrl In UserForm6.Controls
If TypeOf ctrl Is MSForms.CheckBox Then
ctrl.value = True
End If
Next ctrl
End If
Last edited: