Public Function Delay(dblInterval As Double) '---------------------------------------------------- ' Name: Delay ' Purpose: Generic delay code ' Inputs: dblInterval As Double ' Author: Arvin Meyer ' Date: January 2, 1999 ' Comment: '---------------------------------------------------- On Error GoTo Err_Delay Dim Timer1 As Double Dim Timer2 As Double Timer1 = Timer() Do Until Timer2 >= Timer1 + dblInterval DoEvents Timer2 = Timer() Loop Exit_Delay: Exit Function Err_Delay: Select Case Err Case Else MsgBox Err.Description Resume Exit_Delay End Select End Function