Reputation: 1
I've created a UserForm in Outlook that allows me to select which email Template I want created. The VBA for the email Templates work fine in creating the emails, however, when I use the code below in the UserForm, the emails are not created? Am I missing some additional coding in the UserForm?
Private Sub CommandButton1_Click()
If OptionButton1 Then
Call QueueTrackingemail 'Module 2
ElseIf OptionButton2 Then
Call DailyReportsEmail 'Module 3
ElseIf OptionButton3 Then
Call CaptureListingEmail 'Module 4
ElseIf OptionButton4 Then
Call EmmasEmail 'Module 5
ElseIf OptionButton5 Then
Call MondayAgingEmail 'Module 6
ElseIf OptionButton6 Then
Call Email672100 'Module 7
ElseIf OptionButton7 Then
Call Email672200 'Module 8
End If
End Sub
Upvotes: 0
Views: 606
Reputation: 1
Not sure if you got this solved but you need to add a = True
in between the OptionButtonX and the Then e.g.
Private Sub CommandButton1_Click()
If OptionButton1 = True Then
Call QueueTrackingemail 'Module 2
ElseIf OptionButton2 = True Then
Call DailyReportsEmail 'Module 3
etc.. You will need to add command button that runs it once you have clicked on at OptionButton.
Upvotes: 0