SetTimeout
timerRef = SetTimeout (function, milliseconds)
ClearTimeout (timerRef')
timerRef = SetInterval (function, milliseconds)
ClearInterval(timerRef')
Description
SetTimeOut is used to schedule an event for a future time, where function is the name of the Sub or Function to be called, and milliseconds is how long in the future it is to be called. Execution does not halt at this statement – it continues with the next statement. It returns a reference to the timeout action which can be used in ClearTimeout.
SetInterval works like SetTimeout, except function is called repeatedly.
Example
Rem SetTimeout statement T=SetTimeout(nextAction,3000) Function nextAction() MsgBox "nextAction" End Function
Output
(nextAction appears 3 seconds later)