View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Using application.ontime

See www.cpearson.com/Excel/OnTime.aspx


--
Cordially,
Chip Pearson
Microsoft MVP - Excel, 10 Years
Pearson Software Consulting
www.cpearson.com
(email on the web site)

"J.W. Aldridge" wrote in message
ups.com...
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