DelayVB




Public Sub Delay(HowLong as date)
TempTime=DateAdd("s", HowLong, Now)
While TempTime > Now
DoEvents 'Allows windows to handle other stuff
Wend
End Sub

'Or if you don't want windows to handle other background

'stuff use this code:


Public Sub Delay(HowLong as date)
Dim TempTime as Date
TempTime=DateAdd("s", HowLong, Now)
While TempTime > Now
Wend
End Sub

'So, to make the program wait for 5 seconds use the

'following code:

'Delay 5

'other code here that will not be done

'until after the delay











( delayvb.html )- by Paolo Puglisi - Modifica del 17/12/2023