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