Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional macro execution
Is there a way I can fire a macro based on time of day?
i.e 08:10 Thanks in advance, |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional macro execution
Willis,
Look at Application.Ontime. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Willis Marsh" wrote in message ... Is there a way I can fire a macro based on time of day? i.e 08:10 Thanks in advance, |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional macro execution
"Willis Marsh" wrote in message ...
Is there a way I can fire a macro based on time of day? i.e 08:10 Thanks in advance, Hi Willis... this was posted by Rob van Gelder it may be of some help... seeya ste Sub ScheduleMe() Application.OnTime Now() + TimeValue("00:00:05"), "RunMe" End Sub Sub RunMe() Beep ScheduleMe End Sub |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional macro execution
The problem with this code is that there is no way to terminate
the loop. How would you ever stop RunMe from rescheduling itself without terminating Excel? You should store the run time in a public variable, and use the value of that variable in the OnTime procedure. See www.cpearson.com/excel/ontime.htm for details. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "ste mac" wrote in message om... "Willis Marsh" wrote in message ... Is there a way I can fire a macro based on time of day? i.e 08:10 Thanks in advance, Hi Willis... this was posted by Rob van Gelder it may be of some help... seeya ste Sub ScheduleMe() Application.OnTime Now() + TimeValue("00:00:05"), "RunMe" End Sub Sub RunMe() Beep ScheduleMe End Sub |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Conditional macro execution
-----Original Message----- The problem with this code is that there is no way to terminate the loop. How would you ever stop RunMe from rescheduling itself without terminating Excel? You should store the run time in a public variable, and use the value of that variable in the OnTime procedure. See www.cpearson.com/excel/ontime.htm for details. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "ste mac" wrote in message . com... "Willis Marsh" wrote in message .. . Is there a way I can fire a macro based on time of day? i.e 08:10 Thanks in advance, Hi Willis... this was posted by Rob van Gelder it may be of some help... seeya ste Sub ScheduleMe() Application.OnTime Now() + TimeValue ("00:00:05"), "RunMe" End Sub Sub RunMe() Beep ScheduleMe End Sub . Thanks for the help. Sub ScheduleMe() Application.OnTime TimeValue("08:10:00"), "SaveWorksheet ()" End Sub Works just fine |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Execution | Excel Discussion (Misc queries) | |||
Macro Execution, Part Duo | Excel Discussion (Misc queries) | |||
Triggering Macro Execution | Excel Programming | |||
Restricting Macro Execution | Excel Programming | |||
Restricting Macro Execution | Excel Programming |