Here they say:
http://msdn.microsoft.com/en-us/library/office/ff196165(v=office.15).aspx
My question is about this scope of the Application.OnTime method, which I use in my automated systems, where I am going from a daily schedule (starting them once a day) to a weekly schedule (starting them once a week).
When they say that
will run a procedure at 5 P.M. does it mean the next instance of the clock being 17:00:00, whether today or tomorrow, or does it mean all future instances of 17:00:00?
The fact that they have a method to cancel the Application.OnTime method doesn't help, because initially I thought: you have to cancel it because it means all future instances of the clock at 5 P.M., but it could also mean you use it to cancel the procedure before it happens for the first (and only) time.
And if
will only run the procedure once, at the next instance of 5 P.M., which method could I use to run a procedure not just once but at 5 P.M. of every day of the week?
http://msdn.microsoft.com/en-us/library/office/ff196165(v=office.15).aspx
This example runs my_Procedure at 5 P.M.
Code:Application.OnTime TimeValue("17:00:00"), "my_Procedure"
This example cancels the OnTime setting from the previous example
Code:Application.OnTime EarliestTime:=TimeValue("17:00:00"), _ Procedure:="my_Procedure", Schedule:=False
My question is about this scope of the Application.OnTime method, which I use in my automated systems, where I am going from a daily schedule (starting them once a day) to a weekly schedule (starting them once a week).
When they say that
Code:
Application.OnTime TimeValue("17:00:00"), "my_Procedure"
The fact that they have a method to cancel the Application.OnTime method doesn't help, because initially I thought: you have to cancel it because it means all future instances of the clock at 5 P.M., but it could also mean you use it to cancel the procedure before it happens for the first (and only) time.
And if
Code:
Application.OnTime TimeValue("17:00:00"), "my_Procedure"