I am attempting to use the Application.Ontime timers for the first
time and am experiencing an issue that I can't seem to overcome on my
own.
When I use this timer in a fuction everything works well.
Application.OnTime EarliestTime:=RunWhen,
Procedure:=cRunWhat2, schedule:=True
In a separate function, I need to turn it off in a different
function. Currently my code looks like this:
Application.OnTime EarliestTime:=RunWhen,
Procedure:=cRunWhat2, schedule:=False.
When I run the macro, I get the following error on the false
statement:
Method 'OnTime' of object '_Application' failed
Can anyone tell me what I am doing wrong. I have triple checked that
all of my variables are declared and defined.