In EXCEL userform I put some OptionButtons in a Frame, then I select one of the OptionButtons and want return the Caption of the selected OptionButton.
Private Sub MyFrame_Enter()
Dim objControl As Control
For Each objControl In MyFrame.Controls
If objControl.Value = True Then
MsgBox objControl.Caption
Exit For
End If
Next
End Sub
Private Sub MyFrame_Enter()
Dim objControl As Control
For Each objControl In MyFrame.Controls
If objControl.Value = True Then
MsgBox objControl.Caption
Exit For
End If
Next
End Sub