Start Excel2000 including a makro

L

Lars

Start Excel2000 including a makro

like Excel.exe c:\..\bok1 makro1 The makro will start autm without press
makro button

Thanks

Lars
 
G

Gord Dibben

Lars

You can't run a macro from a command line but you can run a macro when the
workbook opens.

Private Sub Workbook_Open()
Your Code or macro name goes here
End Sub

Right-click on the Excel logo left of "File" on menu and select "View Code"
If workbook is not maximized click on the Logo on the title bar.

Paste the above into that module.

Command line will read C:\....yourpath\file name


Gord Dibben MS Excel MVP
 

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