Automate macro

M

Marc

Hi,
Is it possible to have a macro run automatically when a
particular spreadsheet opens?
I'm in Excel 2000 and Windows 98.

Thanks,

Marc
 
J

John Wilson

Marc,

Two ways.....

1st is to name your macro Auto_Open

Sub Auto_Open()
'your code here or your sub name here
End Sub

or place your code (or a call to your sub) in the Workbook_Open Event
Double click on the "ThisWorkbook" in the "Projects" window and copy
and paste the following:

Private Sub Workbook_Open()
'your code here or your sub name here
End Sub

John
 

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