Hi all,
I have what seemed like simple vba code from Microsoft's website, but I am running into errors. I have a workbook where a userform opens when the workbook is started and a message prompts that a macro will run in 90 seconds unless the command button is clicked. Clicking the button gives me errors.
Any assistance in where I've gone wrong would be helpful.
I have what seemed like simple vba code from Microsoft's website, but I am running into errors. I have a workbook where a userform opens when the workbook is started and a message prompts that a macro will run in 90 seconds unless the command button is clicked. Clicking the button gives me errors.
VBA Code:
Private Sub CommandButton1_Click()
Application.OnTime EarliestTime:=Now + TimeValue("00:01:30"), _
Procedure:="Create_TheReport", Schedule:=False
Me.Hide
End Sub
Private Sub UserForm_Initialize()
Application.OnTime Now + TimeValue("00:01:30"), "Create_TheReport"
End Sub