TimeOut !

By | 2002-06-01

This is a neat little Sub that will Cause a Pause or “Time Out” in your program.

Original Author: Stephen Glauser

Inputs

Duration (1 equals 1 Second, .5 equals a Half Second)

Side Effects

This will cause the program to wait the specified duration before continueing.

Code

Sub TimeOut (duration)
StartTime = Timer
Do While Timer - StartTime < duration
  X = DoEvents()
Loop
End Sub

Author: dwirch

Derek Wirch is a seasoned IT professional with an impressive career dating back to 1986. He brings a wealth of knowledge and hands-on experience that is invaluable to those embarking on their journey in the tech industry.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.