How to run a macro as soon a a workbook (.xls) is opened?

  • Thread starter Thread starter Guest
  • Start date Start date
Use the Workbook_Open event. In Excel right click the Excel Icon just
left of the File Menu. Select View Code. Paste the following and change
as required:

Private Sub Workbook_Open()
MsgBox "Hello World!"
End Sub

Hope this helps
Rowan
 

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