Cancel OnTime
DOH !
It does work, I was reading the wrong variable when checking it !!
Thanks for reading anyway.
"MAS" wrote in message
...
The following code runs my proceedure very well;
RunWhen = Now + TimeSerial(0, 0, cRunIntervalSeconds)
Application.OnTime earliesttime:=RunWhen, procedu=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, procedu=cRunWhat,
Schedule:=False
But for some reason it is not stopping the OnTime. What am I missing
please ?
|