Hi all,
I am trying to test buttons again, I have a form with more than a few optionbuttons inside a frame control, in the frame, I also have other controls, but none that would give a true false value, except for the optionbutton. I can’t figure out why my code will not work.
I keep getting “objects doe not support”
Can anyone see wrong with this code?
Thanks,
Darryl.
option explicit
Public Function AreAnyTrue() As Boolean
Dim ctl As Control
Dim z As String
Dim opt As OptionButton
UnitsAreAnyTrue = False
For Each opt In UserForm2.FrUnit
If ctl.Value = True Then
UnitsAreAnyTrue = True
Exit Function
End If
Next opt
End Function