excel macro on startup from DOS

R

roblit

After I start excel from a DOS .BAT script I want a macro to then be automatically executed. (To do this with MS Word you just put /Mmacroname after the path name of the executable, but this does not seem to work)
 
C

Chip Pearson

Excel doesn't support macro execution from the command line. As
an alternative, you can name the macro Auto_Open and this will
execute when the workbook is opened.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

roblit said:
After I start excel from a DOS .BAT script I want a macro to
then be automatically executed. (To do this with MS Word you just
put /Mmacroname after the path name of the executable, but this
does not seem to work) .
 
F

Frank Kabel

Hi roblit
AFAIK there is no similar functionality in Excel. Though you can create
a macro in Excel and name it Auto_Open (). This will automatically
executed on startup
Or you can paste your code in the workboot_open event procedure of the
workbook module

Frank
 
Top