![]() |
Using application.ontime
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 |
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 |
All times are GMT +1. The time now is 07:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com