Run xlsm Macro in the middle of night
Hello,
I've got several macros which we would like to run in the middle of the night - anyone got any suggestions of the best way of automatcally running them? Use the OnTime method? problem is a macro still needs to be run. Just wondering if a stored prodecdure on a sql server would be capable of creating an event which could run the macro? Any help much appreciated. J |
Run xlsm Macro in the middle of night
Hi
You could use a Workbook_Open event to call OnTime method. Of course the workbook has to be open. Hopes this helps. //Per skrev i meddelelsen ... Hello, I've got several macros which we would like to run in the middle of the night - anyone got any suggestions of the best way of automatcally running them? Use the OnTime method? problem is a macro still needs to be run. Just wondering if a stored prodecdure on a sql server would be capable of creating an event which could run the macro? Any help much appreciated. J |
Run xlsm Macro in the middle of night
use the windows task scheduler - set it to run the desired workbook at the
appropriate time. in the workbook, make sure that you use the workbook open event to start your sub, or have a sub name Auto_open wrote in message ... Hello, I've got several macros which we would like to run in the middle of the night - anyone got any suggestions of the best way of automatcally running them? Use the OnTime method? problem is a macro still needs to be run. Just wondering if a stored prodecdure on a sql server would be capable of creating an event which could run the macro? Any help much appreciated. J |
Run xlsm Macro in the middle of night
And to add to Patrick's response...
Make sure your security settings are set to allow macros to run. You wouldn't want to check the next morning to find that excel is prompting you to see if macros should be enabled. Patrick Molloy wrote: use the windows task scheduler - set it to run the desired workbook at the appropriate time. in the workbook, make sure that you use the workbook open event to start your sub, or have a sub name Auto_open wrote in message ... Hello, I've got several macros which we would like to run in the middle of the night - anyone got any suggestions of the best way of automatcally running them? Use the OnTime method? problem is a macro still needs to be run. Just wondering if a stored prodecdure on a sql server would be capable of creating an event which could run the macro? Any help much appreciated. J -- Dave Peterson |
Run xlsm Macro in the middle of night
I don't think that the workbook has to be open for this. Excel will find the
workbook with that ontime macro and open it if it needs to. But the excel application does have to be kept open. Per Jessen wrote: Hi You could use a Workbook_Open event to call OnTime method. Of course the workbook has to be open. Hopes this helps. //Per skrev i meddelelsen ... Hello, I've got several macros which we would like to run in the middle of the night - anyone got any suggestions of the best way of automatcally running them? Use the OnTime method? problem is a macro still needs to be run. Just wondering if a stored prodecdure on a sql server would be capable of creating an event which could run the macro? Any help much appreciated. J -- Dave Peterson |
Run xlsm Macro in the middle of night
On 6 June, 15:23, "Patrick Molloy" wrote:
use the windows task scheduler - set it to run the desired workbook at the appropriate time. *in the workbook, make sure that you use the workbook open event to start your sub, or have a sub name Auto_open wrote in message ... Hello, I've got several macros which we would like to run in the middle of the night - anyone got any suggestions of the best way of automatcally running them? Use the OnTime method? problem is a macro still needs to be run. Just wondering if a stored prodecdure on a sql server would be capable of creating an event which could run the macro? Any help much appreciated. J- Hide quoted text - - Show quoted text - ok - I've not used the Windows Task Scheduler before.....where do I start; do you have any links to help a newby with the scheduler. What will I be scheduling? Opening the wkbk? this will then fire the Workbook_Open Ontime routine (I'm fine with this part of the answer as I regularly use this event and this method)........ or will I be scheduling an actual reference to the macro in the workbook? thanks for all the help so far Jason. Jason. |
Run xlsm Macro in the middle of night
you'll find the windows scheduler in the Control Panel in Administrative
Tools add a new task and set the action to open the workbook. You set the Auto_Open procedure or use the workbook_Open event...you know how already wrote in message ... On 6 June, 15:23, "Patrick Molloy" wrote: use the windows task scheduler - set it to run the desired workbook at the appropriate time. in the workbook, make sure that you use the workbook open event to start your sub, or have a sub name Auto_open wrote in message ... Hello, I've got several macros which we would like to run in the middle of the night - anyone got any suggestions of the best way of automatcally running them? Use the OnTime method? problem is a macro still needs to be run. Just wondering if a stored prodecdure on a sql server would be capable of creating an event which could run the macro? Any help much appreciated. J- Hide quoted text - - Show quoted text - ok - I've not used the Windows Task Scheduler before.....where do I start; do you have any links to help a newby with the scheduler. What will I be scheduling? Opening the wkbk? this will then fire the Workbook_Open Ontime routine (I'm fine with this part of the answer as I regularly use this event and this method)........ or will I be scheduling an actual reference to the macro in the workbook? thanks for all the help so far Jason. Jason. |
All times are GMT +1. The time now is 10:43 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com