Hi
I want a program to call a total of 8 commands. The commands need to be about 3 min apart.
How would I do this. Thanks Paul
Printable View
Hi
I want a program to call a total of 8 commands. The commands need to be about 3 min apart.
How would I do this. Thanks Paul
You can do something like this:
Then use this TimeOut routine to pause between your commands, i.e:Code:Private Sub TimeOut(pInterval As Single)
Dim sngTimer As Single
sngTimer = Timer
Do While Timer < sngTimer + pInterval
DoEvents
Loop
End Sub
Call Your Command
TimeOut 180 ' In seconds thats 3 min
Call Your Another command
An so on...
------------------
Serge
Programmer Analyst
[email protected]
[email protected]
ICQ#: 51055819
This code will execute a DoWhile for the number of seconds that you set.
Is this what you were looking for?Code:Dim dtTimer As Date
Dim lngWaitSeconds As Long
' lngWaitSeconds defines the length of time to run the loop
lngWaitSeconds = 120
dtTimer = Timer
Do While (Timer - dtTimer) < lngWaitSeconds
Loop