ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro fire at given time, through command prompt (https://www.excelbanter.com/excel-programming/307459-macro-fire-given-time-through-command-prompt.html)

tim

Macro fire at given time, through command prompt
 
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

Frank Stone

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
.



All times are GMT +1. The time now is 03:28 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com