Excel 2002 Automatic Macros

  • Thread starter Thread starter CM
  • Start date Start date
C

CM

Is there a way to have a macro run automatically when a
workbook is opened, or is such a feature unavailable for
security reasons?

Thanks,

CM
 
Here's a response from John Wilson in an earlier post
today:

Two ways.....

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
 
Back
Top