invoke macro from outside excel - auto macros

N

nongo

I have got 2 macros to my workbook that prints the entire
active worksheet or a given single page of the worksheet.
How can I call these modules from outside excel
automatically. Say from the command line, or Inter
Explorer.

Thanks in advance.
 
J

Jim Rech

Macros cannot be called from outside Excel, e.g., from the command line.
The only macros that run automatically when a workbook opens is Sub
Auto_Open in a regular module and Sub Workbook_Open in the ThisWorkbook
module. You could run your code from either of them, perhaps asking the
user via MsgBox if he wants to print.
 
K

Keith Willshaw

Jim Rech said:
Macros cannot be called from outside Excel, e.g., from the command line.
The only macros that run automatically when a workbook opens is Sub
Auto_Open in a regular module and Sub Workbook_Open in the ThisWorkbook
module. You could run your code from either of them, perhaps asking the
user via MsgBox if he wants to print.

It is possible to do it from Internet Explorer using vbscript
though using the Application.run syntax

There's an example of opening and writing to
Excel with IE and vbscript at

http://www.rlmueller.net/Programs/XLWrite.txt

to do the same thing using asp see

http://builder.com.com/5100-6373-5072712.html#Listing F

Keith
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top