ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Start macro when excel opens (https://www.excelbanter.com/excel-programming/343886-start-macro-when-excel-opens.html)

ps

Start macro when excel opens
 
I created a macro that does page setup routines for me (adjusts margins,
create titles, etc). I want this macro to be available everytime I open
Excel. How do I do that?
Thanks!



Neily[_3_]

Start macro when excel opens
 
What to do is rename your macro as Auto_Open and this will then run when the
file is opened.

eg.

Sub Auto_Open
MsgBox("This code runs when the workbook is opened.")
End Sub

Neil
"ps" wrote:

I created a macro that does page setup routines for me (adjusts margins,
create titles, etc). I want this macro to be available everytime I open
Excel. How do I do that?
Thanks!




ps

Start macro when excel opens
 
Thank you!

"Neily" wrote in message
...
What to do is rename your macro as Auto_Open and this will then run when
the
file is opened.

eg.

Sub Auto_Open
MsgBox("This code runs when the workbook is opened.")
End Sub

Neil
"ps" wrote:

I created a macro that does page setup routines for me (adjusts margins,
create titles, etc). I want this macro to be available everytime I open
Excel. How do I do that?
Thanks!







All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com