Using application.ontime

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top