Auto start a macro

  • Thread starter Thread starter Victor Lin
  • Start date Start date
V

Victor Lin

I would like to find out how to auto start a macro when I
open a Excel file

Victor
 
Put it in the Workbook_Open event in the ThisWorkbook module.
 
In the workbook:

Option Explicit

================
Private Sub Workbook_Open()

FirstSheet = True
Application.Run ("Main")

End Sub
 
i'm not sure..
but can't you just name the macro "Auto_Open" and it will start upo
opening the file
 

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