Greetings,
I would like to return the name of the optionbutton that has been selected in Frame1. In addition to other optionbuttons, a textbox and combobox are included in the frame.
I used the following code:
But I get a run-time error 438 : object doesn't support this property or method. When I changedPrivate Sub Label15_Click() Dim sAction As String For Each ctr In Me.Frame1.Controls If TypeOf ctr Is MSForms.OptionButton And ctr.Value = True Then sAction = ctr.Caption End If Next Range("A3") = sAction End Sub
toctr.Value
I was able to get the desired result. I am trying to understand why I would not get the desired result using the "Value" property.ctr.Object
Attached is a sample file.
Thanks for your help.
Asha
Bookmarks