Autorun a macro on Excel startup

  • Thread starter Thread starter R Guzman
  • Start date Start date
R

R Guzman

Does anyone know how I can execute a macro to auto-start once I open up an
Excel file?

Thanks.
 
Hi,

You can put this in your excel file:

Private Sub Workbook_Open()
[Your code here]
End Sub

Regards,
Bondi
 
Hi

If you name the macro Auto_open, then it will execute on opening the
file

Sub Auto_open()

your code here

End Sub
 
Thanks everyone for your solution.

Regards, R.

Roger Govier said:
Hi

If you name the macro Auto_open, then it will execute on opening the file

Sub Auto_open()

your code here

End Sub
 
Back
Top