Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Application.Ontime Schedule:=False errors

  Asked By: Aidan    Date: Sep 25    Category: MS Office    Views: 1843
  

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.

Share: 

 

1 Answer Found

 
Answer #1    Answered By: Deloris Harris     Answered On: Sep 25

It very probably means that the schedule  you're trying to cancel
doesn't exist; either cRunWhat or RunWhen has changed since the
schedule was made.

 
Didn't find what you were looking for? Find more on Application.Ontime Schedule:=False errors Or get search suggestion and latest updates.




Tagged: