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