phantom1975
MrExcel MVP
- Joined
- Jun 3, 2002
- Messages
- 3,962
I have a frame with 8 OptionButtons inside of it. I have a variable that is defined by the caption of the OptionButton that is selected. This is the code I am about to write:
Private Sub OptionButton1_Change()
If OptionButton1.Value = True Then
MyVariable = OptionButton1.Caption
End Sub
I would have to write this code for each of the 8 OptionButtons. All of the OptionButtons are inside of a Frame. Is there an easier, more efficient way of doing this?
_________________
The only dumb question is the one that isn't asked. Pass on what you have learned.
This message was edited by phantom1975 on 2002-10-23 03:41
Private Sub OptionButton1_Change()
If OptionButton1.Value = True Then
MyVariable = OptionButton1.Caption
End Sub
I would have to write this code for each of the 8 OptionButtons. All of the OptionButtons are inside of a Frame. Is there an easier, more efficient way of doing this?
_________________
The only dumb question is the one that isn't asked. Pass on what you have learned.
This message was edited by phantom1975 on 2002-10-23 03:41