Endeavouring
Board Regular
- Joined
- Jun 30, 2010
- Messages
- 115
Hi
I am a novice to VBA and have the following problem. I have a ser form with one command button and 2 option buttons, I simply want the user to select one of the option buttons then depending on their selection run the related macro. What is wrong with the following as it coninually errors despite whatever changes I hae tried.
Private Sub CommandButton1_Click()
If OptionButton1.Value = True Then Sub1
ElseIf OptionButton2.Value = True Then Sub2
End If
End Sub
Thank you
I am a novice to VBA and have the following problem. I have a ser form with one command button and 2 option buttons, I simply want the user to select one of the option buttons then depending on their selection run the related macro. What is wrong with the following as it coninually errors despite whatever changes I hae tried.
Private Sub CommandButton1_Click()
If OptionButton1.Value = True Then Sub1
ElseIf OptionButton2.Value = True Then Sub2
End If
End Sub
Thank you