Add the following at the module level:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Run the following as a demo:
Code:
Sub Demo()
Dim lngIndex As Long
For lngIndex = 1 To 10
Doze 500
Next lngIndex
MsgBox "Done"
End Sub
Sub Doze(ByVal lngPeriod As Long)
DoEvents
Sleep lngPeriod
End Sub