-
Without using timer control, what would be the best way to delay execution of code?
I would like to pause the program for about 1/10 of second before executing th. I could just use For loop to run for, say, 100K times, but I would rather use a function call or so.
Thanx.
SK
-
This will do it:
Code:
Dim dblEndTime As Double
dblEndTime = Timer + 0.5
Do While dblEndTime > Timer
' Do nothing but allow other
' applications to process
' their events.
DoEvents
Loop
------------------
Marty
-
There is also the Sleep API which will pause your Apps Processes for a Given number of Milliseconds..
Code:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Command1_Click()
Caption = "Ready.."
Sleep 100 'Pause for 1/10 of a Sec.
Caption = "Go!!!"
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]