Macro With Timer Event
On 9 Dec 2005 07:14:45 -0800, Dave O wrote:
VBA has a function called Timer, a long-type integer that represents
the current number of seconds since midnight. You can use this in code
to create a delay of a number of seconds like this:
Sub Delay()
Dim Beg As Long
Beg = Timer
Do
Loop Until Timer - Beg = 30
End Sub
This assigns the variable Beg (for Begin) with the current Timer value.
Then a DO loop starts that does nothing but loop until 30 seconds
elapses.
Does that do it for you?
I'll let you know!
Thanks.
|