Calling and Excel Macro

  • Thread starter Thread starter Lincoln
  • Start date Start date
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.
 
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.
 
Back
Top