Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default 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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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


  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default 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.
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default 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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Issue uploading macro enabled Excel to Sharepoint(xlsm using xla) test[_4_] Excel Discussion (Misc queries) 0 September 22nd 09 11:46 PM
Macro stops working when save as xlsm - any ideas? TomCon via OfficeKB.com Excel Programming 3 April 16th 09 12:30 PM
Excel 2007 .xlsm file. Macro Security options not available. JP Excel Discussion (Misc queries) 1 July 17th 08 04:04 PM
Default a workbook to save as a xlsm (macro-enabled) in 2007 Razzer204 Excel Discussion (Misc queries) 3 March 21st 07 06:10 PM
Stop running a macro in the middle of a macro gmunro Excel Programming 3 June 9th 05 06:00 PM


All times are GMT +1. The time now is 08:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"