January 5, 2005 at 5:24 am
Does anybody know of a command to sleep in ActiveX I have tried the WScript.sleep but how do you create the WScript object ?
Regards
Carl
January 6, 2005 at 8:20 am
Carl,
Here is a example from the Microsoft VBScript site that uses the Timer function. With a little modification it might do the trick for you.
The following example uses the Timer function to determine the time it takes to iterate a For...Next loop N times:
Function TimeIt(N) Dim StartTime, EndTime StartTime =Timer
For I = 1 To N Next EndTime =Timer
TimeIt = EndTime - StartTimeEnd Function
January 6, 2005 at 6:38 pm
I use the following code:
Dim sngFuture As Single
sngFuture = Timer + 3
January 6, 2005 at 6:40 pm
Somehow I didn't get the whole answer posted last time. Here we go again:
Dim sngFuture As Single
sngFuture = Timer + 3 ' to sleep for 3 seconds
Do Until Timer > sngFuture
Loop
Hope this helps.
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply