VBA/Excel/Access/Word/Date Functions/TimeSerial — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
|
(нет различий)
|
Текущая версия на 12:48, 26 мая 2010
Scheduling a Macro to Run x Minutes in the Future
Sub ScheduleAnything()
WaitHours = 0
WaitMin = 2
WaitSec = 30
NameOfScheduledProc = "CaptureData"
NextTime = time + TimeSerial(WaitHours, WaitMin, WaitSec)
Application.OnTime EarliestTime:=NextTime, Procedure:=NameOfScheduledProc
End Sub
TimeSerial( returns AM
Sub timeDemo()
Debug.Print TimeSerial(9, 0, 0)
End Sub
TimeSerial(hour, minute, second) returns a Variant/Date containing the time for the specified hour, minute, and second
Sub dateDemo14()
Debug.Print TimeSerial(11, 12, 13)
End Sub