Using application.ontime

  • Thread starter Thread starter J.W. Aldridge
  • Start date Start date
J

J.W. Aldridge

Got this code in the workbook module...

Had it working one moment, but now its not.
Want it to open at specific time, run the macro, and then close.

(A)Anyone know the criteria surrounding "application.ontime"
Does Excel have to be open?
Does the workbook have to be open?

(B) How do I effectively run the following code?


Private Sub Workbook_Open()

Application.OnTime TimeValue("13:38:00"), "Macro1"
ActiveWorkbook.Close SaveChanges:=True

End Sub
 
Back
Top