#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default OnTime


I'm drafting a macro by which I want to repeat at intervals of 59 secs
another macro 'TimedOut' so have:

Application.OnTime Now + TimeValue("00:00:59"), "TimedOut"

which works fine. Except even if the worksheet is closed, it reloads
itself and continues [until Excel is closed]. The MS help and the
textbooks say add a line with the same text but ending False ie
Application.OnTime Now + TimeValue("00:00:59"), "TimedOut",False

but that seems to have no effect. Grateful for any suggestions


*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default OnTime

Chip Pearson explains how to use application.ontime:
http://www.cpearson.com/excel/ontime.htm

Take particular note of the way Chip uses a public variable (runwhen) to kill
the next scheduled run.

Gordon Humphreys wrote:

I'm drafting a macro by which I want to repeat at intervals of 59 secs
another macro 'TimedOut' so have:

Application.OnTime Now + TimeValue("00:00:59"), "TimedOut"

which works fine. Except even if the worksheet is closed, it reloads
itself and continues [until Excel is closed]. The MS help and the
textbooks say add a line with the same text but ending False ie
Application.OnTime Now + TimeValue("00:00:59"), "TimedOut",False

but that seems to have no effect. Grateful for any suggestions

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson
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
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 jimmike1 Excel Programming 2 February 2nd 06 04:31 PM
about ontime uma[_2_] Excel Programming 0 January 21st 06 06:33 AM
OnTime Help Mark Scholes Excel Programming 1 January 30th 04 03:48 AM


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

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

About Us

"It's about Microsoft Excel"