Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

applicaiton.ontime and knowing it is going to run

Status
Not open for further replies.

Chrissirhc

Programmer
May 20, 2000
926
GB
Hi,

Once you do:

application.ontime Date + Time + 0.1, "MyRoutine"

Is there any way to tell when MyRoutine will run? I mean without trying to work out when it was run from the ontime? E.g. some sort of command? (Something is happening in the background I guess some sort of thread is kicked off or something?)

Thanks,

Chris
 
Why not something like this ?
Sub MyRoutine()
MsgBox "MyRoutine fired at " & Now
...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Yeah I could print out the time it was fired off into immediate on into a cell. However I wanted to know if there was a way of doing it without that?

E.g. a command to ask what is going to run in the future... regarding the ontime...
 
Actually what I'd really like to do is clear any Ontimes... Is that possible?
 
Ha ha ha.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
:)

Ok - not sure the user will appreciate that...

The user may click a button a number of times, i.e. to turn on and off automatic sending of emails... But then there would be loads of emails sent (if the last time he his the button he turned sending on)...

I'd like to clear the ontimes so that it doesn't send extra emails...
 
Ok yuo need to know the exact time of the ontime to get rid of it...
 
When you do:
Code:
application.ontime Date + Time + 0.1, "MyRoutine"
you could store the Date + Time + 0.1 value somewhere ( I'd use a sheet somewhere ), so that you can go back and cancel later.

Cheers, Glenn.

Did you hear about the literalist show-jumper? He broke his nose jumping against the clock.
 
Yeah thats kind of what I've done. I store the value in the sheet.

Cheers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top