A
Aidy
I am using a VBA that is not Excel. But I was using a wrapper around
Excel's 'Wait' method to add delays.
Here is the code: (modified from Excel's help)
Public Sub DelayFor(iwaitTime As Integer)
Dim oExcel As Excel.Application
Dim newHour, newMinute, newSecond, waitTime
Set oExcel = New Excel.Application
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + iwaitTime
waitTime = TimeSerial(newHour, newMinute, newSecond)
oExcel.wait waitTime
Set oExcel = Nothing
End Sub
However would it be more memory efficient to use the sleep win32
function?
Aidy
Excel's 'Wait' method to add delays.
Here is the code: (modified from Excel's help)
Public Sub DelayFor(iwaitTime As Integer)
Dim oExcel As Excel.Application
Dim newHour, newMinute, newSecond, waitTime
Set oExcel = New Excel.Application
newHour = Hour(Now())
newMinute = Minute(Now())
newSecond = Second(Now()) + iwaitTime
waitTime = TimeSerial(newHour, newMinute, newSecond)
oExcel.wait waitTime
Set oExcel = Nothing
End Sub
However would it be more memory efficient to use the sleep win32
function?
Aidy