|
-
Nov 4th, 2011, 07:47 AM
#3
Thread Starter
Addicted Member
Re: Timer delay
 Originally Posted by Mike54
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|