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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word vs Excel OnTime 1

Status
Not open for further replies.
Apr 27, 2006
126
GB
To cancel a OnTime event set in excel vba i have:

Code:
Application.OnTime NextTick, "UpdateClock", , False

which works fine in excel, but in Word the OnTime function seems to work differently

Excel:
expression.OnTime(EarliestTime, Procedure, LatestTime, Schedule)

Word:
expression.OnTime(When, Name, Tolerance)

I basically need to know how to cancel an OnTime event in Word in the same way that Excel handles it.

________
clueless
 
in case it is useful, this is how the timer is started:

Code:
NextTick = Now + TimeValue("00:00:01")
Application.OnTime NextTick, "UpdateClock"

________
clueless
 
A new OnTime event calling a noop macro will cancel the previous scheduled call.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
ah, never mind, I think I see what you mean.

You can only have one OnTime event running at a time so if I set the ontime event to point at an empty sub, it will cease to do anything?

If so, cheers :)

________
clueless
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top