Macro fire at given time, through command prompt
here is a sub i use to start a macro (macAStart) at 5 am
each morning(while i'm home still in bed)so that morning
reports will be on the printer when i get to work. The
whole routine launches 10 different macros in as many
files. it skipps sat and sun.
Sub macALaunchMR()
If Weekday(Now()) = 6 Then '1 = Sunday, 2 = Monday, 3 =
Tuesday, ect
Application.OnTime Now() + 2.5 + TimeValue
("00:00:03"), "macAStart"
Else
Application.OnTime TimeValue("05:00:00"), "macAStart"
End If
End Sub
look up the ontime event in help for more details
-----Original Message-----
Hi
We have a macro that does some formatting on a sheet. Is
there any way of prompting this macro to fire from the
windows command prompt, and to make it fire automatically
once a day?
once a day, a file is deposited in the same location
which is then amended. The process is the same everytime,
we'd just liek ti to sort itself out without intervention
TIA
tim
.
|