Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 425
Default 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

  #2   Report Post  
Posted to microsoft.public.excel.programming
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


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cancelling Application.OnTime Dan Excel Programming 4 July 11th 07 11:22 AM
Help with Application.OnTime [email protected] Excel Programming 1 April 3rd 06 06:02 PM
application.ontime rick Excel Programming 2 July 25th 05 06:09 PM
OnTime Unusual Application Peter[_52_] Excel Programming 4 January 19th 05 05:59 AM
Application.OnTIme Mike Excel Programming 8 September 15th 04 03:27 PM


All times are GMT +1. The time now is 01:51 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"