Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro on a specific time
I would like to run a macro at a specific time every day automatically e.g. I
would like to run my macro at 12:00 GMT every day without having to do anything (except writing the code of course). Is this possible and does Excel and the spreadsheet has to be open in order for the macro to run? Please help me! Thank you very much! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro on a specific time
Excel and the spreadsheet have to be open when the macro runs.
You can use the windows schedular to open excel/the workbook In the workbook_Open event, put in code to trigger the code you want to run and close Excel. -- Regards, Tom Ogilvy "Viktor Ygdorff" wrote: I would like to run a macro at a specific time every day automatically e.g. I would like to run my macro at 12:00 GMT every day without having to do anything (except writing the code of course). Is this possible and does Excel and the spreadsheet has to be open in order for the macro to run? Please help me! Thank you very much! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Running a macro on a specific time
Yes you can, Excel needs to remain open.
Use the following (you could put in the open workbook event) Application.OnTime TimeValue("12:00:00"), "myCode" At 12 noon the code myCode procedure runs at the end of the procedure the event is retriggered to run again at 12:00:00 Sub myCode() ' this code runs at 12:00:00 ' code here as required ' reset trigger for new start time Application.OnTime TimeValue("12:00:00"), "mycode" End Sub Cheers Nigel RS "Viktor Ygdorff" wrote: I would like to run a macro at a specific time every day automatically e.g. I would like to run my macro at 12:00 GMT every day without having to do anything (except writing the code of course). Is this possible and does Excel and the spreadsheet has to be open in order for the macro to run? Please help me! Thank you very much! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Disabling worksheet_change when running a specific macro . . | Excel Programming | |||
Running a macro at a specified time | Excel Discussion (Misc queries) | |||
Macro running time | Excel Programming | |||
All time running macro | Excel Programming | |||
Running a macro at a certain time | Excel Programming |