Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
MAS MAS is offline
external usenet poster
 
Posts: 19
Default Cancel OnTime

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
?



  #2   Report Post  
Posted to microsoft.public.excel.programming
MAS MAS is offline
external usenet poster
 
Posts: 19
Default 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 ?





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Workbook_BeforeClose(Cancel As Boolean) - Cancel won't work gpmichal Setting up and Configuration of Excel 1 May 12th 09 02:33 AM
Find %ontime & SUMIF ontime ie: find matching sets within Range... Chris T-M Excel Worksheet Functions 3 October 10th 08 08:14 PM
OnTime bug? Antonio Excel Discussion (Misc queries) 0 June 9th 06 08:24 PM
OnTime VB [email protected] Excel Discussion (Misc queries) 5 May 17th 06 10:53 PM
Cancel Macro is user selects 'cancel' at save menu Mark Excel Programming 1 April 6th 05 05:45 PM


All times are GMT +1. The time now is 01:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"