Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running an excel macro from the commandline

Status
Not open for further replies.

funkmonsteruk

IS-IT--Management
Feb 8, 2002
210
GB
Hi,

I'm running an excel macro overnight as a scheduled task, but i can't use the autoopen command as the workbook needs to be openened and manipulated by other users.

Does anybody know how to call an excel macro from the command line
 
Sure, just use a modification of that approach - put the startup macro in a different workbook (which others won't need to open), and have that macro open the workbook in which you need to run the macro and call the macro from the other workbook. I've never tried it, but I figure it would work.
Rob

 
Cheers,

Have ended up using an autoopen in combination with the saveas method to copy the relevant sheet of updated data and paste it into a new book.
 
Hi all,
I would like to schedule my macro to run at night also, but I don't know how to start, can someone give me some code to run it? thanks, helper are greatly appreciated.


KIm
 
Just as an aside - in some situations it may be easier to just use the Application.OnTime event handler to start a macro at a certain preset time.
Rob
Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top