Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default invoke macro from outside excel - auto macros

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.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default invoke macro from outside excel - auto macros

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.

--
Jim Rech
Excel MVP


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 170
Default invoke macro from outside excel - auto macros


"Jim Rech" wrote in message
...
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-507...ml#Listing%20F

Keith


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 to get userform Cancel button to invoke Exit Sub in calling macro? Craig Remillard New Users to Excel 1 November 19th 09 03:55 AM
How do I invoke a call in Excel DeviceConnect Excel Discussion (Misc queries) 5 February 24th 09 09:34 PM
HELP: Setting CNTL-SHIFT-F to invoke Excel2007 macro Jay Somerset Excel Discussion (Misc queries) 7 June 3rd 07 09:40 PM
How can I invoke running a macro from within an "IF" function. ron Excel Worksheet Functions 11 February 8th 06 03:35 PM
add data to combo box in excel then invoke macro Richard Excel Worksheet Functions 1 December 11th 05 08:50 PM


All times are GMT +1. The time now is 04: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"