Public Declare Function GetTickCount Lib "kernel32" () As LongSub TimeDelay(DT As Long) Dim TT As Long TT = GetTickCount() Do DoEvents If GetTickCount - TT < 0 Then TT = GetTickCount Loop Until GetTickCount - TT >= DTEnd Sub