Scheduling a Macro to Run Every Two Minutes
Sub ScheduleAnything()
WaitHours = 0
WaitMin = 2
WaitSec = 0
NameOfThisProcedure = "ScheduleAnything"
NameOfScheduledProc = "RemindMe"
NextTime = Time + TimeSerial(WaitHours, WaitMin, WaitSec)
Application.OnTime EarliestTime:=NextTime, Procedure:=NameOfThisProcedure
Application.Run NameOfScheduledProc
End Sub
Sub RemindMe()
Application.Speech.Speak Text:="meeting."
End Sub
Related examples in the same category