Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default How to run macro with scheduler

What is the best way to run an excel macro with the scheduler??
- is it possible to run the macro on file open?? how
- is it possible to run directly the macro as a VBA file??
- maybee another way??

thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 22,906
Default How to run macro with scheduler

You would store the macro code in Thisworkbook module as a Workbook_Open sub
then use task scheduler to start Excel with that workbook to open.

Or store the macro in a general module and name it Sub Auto_Open() and open
workbook using task scheduler as above.


Gord Dibben MS Excel MVP

On Sun, 19 Aug 2007 08:00:01 -0700, Dan wrote:

What is the best way to run an excel macro with the scheduler??
- is it possible to run the macro on file open?? how
- is it possible to run directly the macro as a VBA file??
- maybee another way??

thanks


  #3   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default How to run macro with scheduler

Thanks - it works

"Gord Dibben" wrote:

You would store the macro code in Thisworkbook module as a Workbook_Open sub
then use task scheduler to start Excel with that workbook to open.

Or store the macro in a general module and name it Sub Auto_Open() and open
workbook using task scheduler as above.


Gord Dibben MS Excel MVP

On Sun, 19 Aug 2007 08:00:01 -0700, Dan wrote:

What is the best way to run an excel macro with the scheduler??
- is it possible to run the macro on file open?? how
- is it possible to run directly the macro as a VBA file??
- maybee another way??

thanks



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 3,365
Default How to run macro with scheduler

Maybe explain a little more about what you want to do?

Can you run the macro on File Open? Yes. Use the Workbook's
Workbook_Open() event process to either run the code or to make a call to the
code if written into another module. To get to the Workbook's _Open() event
section, right click on the Excel icon to the left of the word "File" in the
menu bar and choose [View Code] from the list that appears. In the lefthand
pulldown above the large code module area, choose Workbook, and
Workbook_Open() is the default 'stub' that will be started for you.

Can you run the code as a VBA file? No. The Excel file has to be open for
the code in it to be executed.

"Dan" wrote:

What is the best way to run an excel macro with the scheduler??
- is it possible to run the macro on file open?? how
- is it possible to run directly the macro as a VBA file??
- maybee another way??

thanks

  #5   Report Post  
Posted to microsoft.public.excel.misc
dan dan is offline
external usenet poster
 
Posts: 866
Default How to run macro with scheduler

thanks a lot - it works

"JLatham" wrote:

Maybe explain a little more about what you want to do?

Can you run the macro on File Open? Yes. Use the Workbook's
Workbook_Open() event process to either run the code or to make a call to the
code if written into another module. To get to the Workbook's _Open() event
section, right click on the Excel icon to the left of the word "File" in the
menu bar and choose [View Code] from the list that appears. In the lefthand
pulldown above the large code module area, choose Workbook, and
Workbook_Open() is the default 'stub' that will be started for you.

Can you run the code as a VBA file? No. The Excel file has to be open for
the code in it to be executed.

"Dan" wrote:

What is the best way to run an excel macro with the scheduler??
- is it possible to run the macro on file open?? how
- is it possible to run directly the macro as a VBA file??
- maybee another way??

thanks



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
Creating a random scheduler. timjm Excel Discussion (Misc queries) 2 August 14th 06 08:39 AM
task scheduler Big Jim New Users to Excel 0 June 1st 06 07:00 PM
Lost items in task scheduler Big Jim New Users to Excel 0 June 1st 06 06:59 PM
Scheduler and passwords VPH Excel Discussion (Misc queries) 2 May 19th 06 06:15 PM
Is there a diary/scheduler in Office, rather than Outloook Lolly Excel Discussion (Misc queries) 2 July 7th 05 10:00 AM


All times are GMT +1. The time now is 07:41 PM.

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

About Us

"It's about Microsoft Excel"