How to auto activate macro when file open ?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have created a macro (in the visual basic editor as sub function/procedure)
in my file, and I want to activate it as soon as the file open or when the
":" button is pressed. Anybody that can help me with this problem ?
Thank's.
 
Hi Bonzio,

Double click the ThisWorkbook icon in the Project Explorer to Expose
the ThisWorkbook Code Module. At the top of the blank module you should
see (General) on the left and (Declarations) on the right. Change
(General) to (Workbook) by clicking the down arrow and selecting
(Workbook). When you do that an empty Workbook_Open Sub will appear.
Type the name of the Sub you want to run here and it will run when the
workbook is open.

Ken Johnson
 

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