command line excel to run macros

B

baldev

does anyone know how to run excel from a command line
incorporating Excel macro eg

Call Excel.exe /macro=mymacro
 
B

Bob Phillips

You would be bets to put the macro code in the workbook as an automatically
run code, either by

call it Auto_Open and place in a normal code module

put it in the Workbook_Open event code in the ThisWorkbook code module.

If you want this to happen when you start Excel rather than just one
specific workbook, put it in Personal.xls.
 

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