Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default macro to run automatically

On Wed, 30 Jul 2003 11:25:34 -0700, "Karon" wrote in
microsoft.public.excel.programming:

is it possible to have a macro run on it's own on a daily
basis without having to open the spreadsheet?


Yes.

1. Create a VBS file along these lines:

Set myApp = WScript.CreateObject("Excel.Application")
Set myBook = myApp.WorkBooks.Open("d:\path\workbook.xls")
myApp.Run("MyMacro")
myBook.Save ' if you want/need to
Set myBook=nothing
myApp.Quit
Set myApp = Nothing

2. Schedule a job (CSCRIPT.EXE) to run the above.

--
Michael Bednarek, IT Manager, Tactical Global Management
Waterfront Pl, Brisbane 4000, Australia. "POST NO BILLS"
http://mcmbednarek.tripod.com/
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
How do you do the following using VBA macro automatically? LunaMoon Excel Discussion (Misc queries) 1 May 4th 10 08:37 PM
macro run automatically Daniel Excel Discussion (Misc queries) 1 August 3rd 07 03:00 PM
Automatically Run macro Anift Setting up and Configuration of Excel 2 November 25th 06 02:52 PM
Macro to automatically run Pam C Excel Discussion (Misc queries) 1 May 5th 05 02:35 PM
Run macro automatically. Excel macro New Users to Excel 7 April 19th 05 04:01 PM


All times are GMT +1. The time now is 09:53 PM.

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"