how to get a macro to run when the file opens

  • Thread starter Thread starter Mary
  • Start date Start date
Name the macro "Private Sub Workbook_Open()" and place it under ThisWorkbook
in the Visual Basic editor. Save and close the workbook, reopen, and the
macro should run.
**** Hope it helps! ****

~Dreamboat
Excel VBA Certification Coming Soon!
www.VBAExpress.com/training/
********************************
 
Hello Mary,

Name your macro Auto_Open()

Example:

Sub Auto_Open()
'your macro code
End sub

Sincerely,

Kris
 
right click the excel sheet next to the menu option 'File'
click 'view code'
right your code here and it runs on open.
 

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