N
Newbie
Hello,
How can I introduce a time delay (5 seconds for ex) in VBA Project ?
Thanks
How can I introduce a time delay (5 seconds for ex) in VBA Project ?
Thanks
Newbie said:Hello,
How can I introduce a time delay (5 seconds for ex) in VBA Project ?
Thanks
Rod Gill said:Screen updating should finish before your macro can continue. However to
delay 5 seconds try:
Sub Delay()
Dim Tim As Single
Tim = Timer
Do Until Timer - Tim > 5
DoEvents
Loop
End Sub
DoEvents tells VBA to go away and handle any events (such as screen updating
maybe) then come back and continue.
--
Rod Gill
Project MVP
Visit www.msproject-systems.com for Project Companion Tools and more
Newbie said:Wonderful! Thanks!