R
RyanH
I have an optionbutton in a frame along with a variety of controls. I would
like to enable = True when the Option Button = True and visa versa. The code
below works, but only for TextBoxes. Can this code work for all controls?
Private Sub OptionButton13_Click()
Dim ctrl As Control
For Each ctrl In Me.Frame2.controls
If TypeOf ctrl Is MsForms.TextBox Then
ctrl.Enabled = OptionButton13.Value
End If
Next
End Sub
Thanks,
Ryan
like to enable = True when the Option Button = True and visa versa. The code
below works, but only for TextBoxes. Can this code work for all controls?
Private Sub OptionButton13_Click()
Dim ctrl As Control
For Each ctrl In Me.Frame2.controls
If TypeOf ctrl Is MsForms.TextBox Then
ctrl.Enabled = OptionButton13.Value
End If
Next
End Sub
Thanks,
Ryan