Calling and Excel Macro

L

Lincoln

I am attempting to automate the opening and execution of a macro from a VBA
procedure in Ms Access.
This single line of code upens up the application but does not execute the
macro "mymacro".

Call Shell("Excel.exe S:\Mynetworkpath\Myfile..xls /mymacro ")

Any help would be greatly appreciated.
 
D

Daniel Pineault

From what I know it is not possible to run an Excel macro from the command
line. And I quote "You can't run a named macro from the command line. The
only way you can get a macro to run automatically when an Excel file is
opened is by naming it Sub Auto_Open. Jim Rech -- Excel MVP "

Here are two place to look at for solutions
http://www.cardaconsultants.com/en/msaccess.php?lang=en&id=0000000014#RunXlPro
http://groups.google.ca/group/micro...k=st&q=shell+run+excel+macro#56cd833c9784f772
--
Hope this helps,

Daniel Pineault
For Access Tips and Examples: http://www.cardaconsultants.com/en/msaccess.php
If this post was helpful, please rate it by using the vote buttons.
 

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