Quote Originally Posted by Mike54 View Post
I've found this to work in vb 2010. This will cause a 4 second delay


Delay(4)

Sub Delay(ByVal dblSecs As Double)
Const OneSec As Double = 1.0# / (1440.0# * 60.0#)
Dim dblWaitTil As Date
Now.AddSeconds(OneSec)
dblWaitTil = Now.AddSeconds(OneSec).AddSeconds(dblSecs)
Do Until Now > dblWaitTil
Application.DoEvents() ' Allow windows messages to be processed
Loop
End Sub
Thanks a lot! I added in my code (VS 2008), it passed compiling. I will test the functionality and could need your more help... Thanks again. Have a great weekend.