ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Running macros when Excel starts up (https://www.excelbanter.com/excel-discussion-misc-queries/35049-running-macros-when-excel-starts-up.html)

Solly

Running macros when Excel starts up
 
Hi

How do I get macros or some code to run automatically when I start up an
excel worksheet?

Thanks

Anne Troy

I think you mean workbook, not sheet, correct? Open your workbook. Hit
Alt+F11 or Tools--Macro--Visual Basic Editor. Double-click ThisWorkbook on
the left below your Project's name. On the right, hit the first dropdown and
choose Workbook. You can choose other events on the right-hand dropdown, but
the Workbook_Open appears already, so just place your code between the
Private... and End Sub.
*******************
~Anne Troy

www.OfficeArticles.com


"Solly" wrote in message
...
Hi

How do I get macros or some code to run automatically when I start up an
excel worksheet?

Thanks





All times are GMT +1. The time now is 11:31 PM.

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