I have a userForm with 5 OptionButtons within a Frame on it (there's also a ComboBox on this userForm, which is irrelevant to this issue.) In order to figure out which OptionButton was picked, I have this snippet of code:
If targetForm1 = True Then
targetForm = 1
ElseIf targetForm2 = True Then
targetForm = 2
ElseIf targetForm3 = True Then
targetForm = 3
ElseIf targetForm4 = True Then
targetForm = 4
ElseIf targetFormCU = True Then
targetForm = 99
Else
errForm = True
End If
There has got to be an easier, maybe faster way of setting targetForm. please tell me there is. I can't imaging having many OptionButtons and having to do this If ... ElseIf ... Else ... End If routine...
Bookmarks