Pausing Code

mjdavie

Registered User.
Local time
Today, 21:48
Joined
Sep 17, 2001
Messages
34
Can anybody tell me if there is a way of pausing code for say 5 seconds without using the onTimer Event.

Thanks
 
YOu could try something like this...

Dim firsttime As Variant
Dim secondtime As Variant

firsttime = Timer
secondtime = Timer

Do Until secondtime = firsttime + 5

secondtime = Timer

Loop

Timer is the event that displays the number of seconds after midnight, in case you were wondering. THis code sets firsttime to the current number of seconds after midnight, then loops secondtime being set to Timer until it equals the firsttime + 5, or five seconds. Then it will stop the loop.

Let me know if that helps,

Vassago
 
Thanks guys got both of these to work - very much appreciated
 

Users who are viewing this thread

Back
Top Bottom