Hello,
I'm creating VBA to use in a macro in Outlook. So that when I click on the macro a pop up box appears asking how many times I want to open the 'Next_Step' email template. I've pieced together this code from the internet and I'm getting a 438 error with this line of the code:
numtemplate = Application.InputBox("How many times do you want this template to open?", Type:=1)
Baffles me because the post I found this line of code says that it works great for them. Could it be I'm using the VBA code in Outlook and outlook does not recognize the 'application.inputbox' code?
If so where can I find code that Outlook recognizes for an inputbox?
Thank you for your help with this mystery.
Bev
Here is the full code:
Sub First_Step_1()
Dim numtemplate As Integer, i As Integer
numtemplate = Application.InputBox("How many times do you want this template to open?", Type:=1)
If numtemplate = False Or (Int(numtemplate) < 1) Then Exit Sub
For i = 1 To Int(numtemplate)
Call Next_Step
Next i
End Sub
I'm creating VBA to use in a macro in Outlook. So that when I click on the macro a pop up box appears asking how many times I want to open the 'Next_Step' email template. I've pieced together this code from the internet and I'm getting a 438 error with this line of the code:
numtemplate = Application.InputBox("How many times do you want this template to open?", Type:=1)
Baffles me because the post I found this line of code says that it works great for them. Could it be I'm using the VBA code in Outlook and outlook does not recognize the 'application.inputbox' code?
If so where can I find code that Outlook recognizes for an inputbox?
Thank you for your help with this mystery.
Bev
Here is the full code:
Sub First_Step_1()
Dim numtemplate As Integer, i As Integer
numtemplate = Application.InputBox("How many times do you want this template to open?", Type:=1)
If numtemplate = False Or (Int(numtemplate) < 1) Then Exit Sub
For i = 1 To Int(numtemplate)
Call Next_Step
Next i
End Sub