Auto run macro

M

MacMark

I would like to create a Macro that runs automatically when I first
open an Excel spreadsheet. The Macro can reside on either the primary
spreadsheet, or on a secondary one. The Macro will actually open a
second spreadsheet that contains additional Macros for use on the
primary spreadsheet. I am running Excel X for Macintosh. How do I set
this up?
 
B

Bernard Rey

MacMark :
I would like to create a Macro that runs automatically when I first
open an Excel spreadsheet. The Macro can reside on either the primary
spreadsheet, or on a secondary one. The Macro will actually open a
second spreadsheet that contains additional Macros for use on the
primary spreadsheet. I am running Excel X for Macintosh. How do I set
this up?

The ususal way to have a macro automatically running when opening a workbook
is to write a macro named "Private Sub Workbook_Open()" in the
"ThisWorkbook" code sheet. In your case, it could be something like this:


Private Sub Workbook_Open()

Workbooks.Open "MyOtherWorkbook.xls"

End Sub
 

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