Cancel OnTime

M

MAS

The following code runs my proceedure very well;

RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat,
Schedule:=True

BUT

Sometimes I need to stop the timer before it runs the proceedure so I put
the following code in another Sub snd run it when I need to.

Application.OnTime earliesttime:=RunWhen, procedure:=cRunWhat,
Schedule:=False

But for some reason it is not stopping the OnTime. What am I missing please
?
 
M

MAS

DOH !

It does work, I was reading the wrong variable when checking it !!

Thanks for reading anyway.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top