Auto macro

  • Thread starter Thread starter George Davis
  • Start date Start date
G

George Davis

Dear people,
Can someone tell me how to get a macro to run uponj opening an excel file?
Thanks,
George
(e-mail address removed)
 
Hi George,

Call the macro from the workbook's open event, e.g:

'===========>>
Private Sub Workbook_Open
Call myMacro
End Sub
'<<===========

This code should be placed in the workbook's ThisWorkbook module - not in a
standard module and not in a sheet module.

Alternatively, name the macro Auto_Open and place it in a standard module.


For mor information on event procedures, see Chip Pearson atL

http://www.cpearson.com/excel/events.htm
 

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

Back
Top