View Single Post
 
Old 08-25-2024, 08:36 AM
gmaxey gmaxey is offline Windows 10 Office 2019
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,617
gmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nicegmaxey is just really nice
Default

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
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote