Automatic increment of onTime
Thanks OssieMac.
"OssieMac" wrote:
Hi yet again Rob,
My apologies for the previous version. Was not thinking clearly. The
following method of including the date should handle going past midnight
also. However, the code is untested in conjunction with the OnTime function.
Start time can be real first time because not incremented until after first
iteration.
Sub test()
Dim i As Long
Dim timeStart As Date
Dim timeIncrement As Date
timeStart = Date + TimeValue("17:28:00")
timeIncrement = TimeValue("00:01:00")
For i = 1 To 370
Application.OnTime timeStart, "CopyVolume" & i
timeStart = timeStart + timeIncrement
Next i
End Sub
--
Regards,
OssieMac
|