Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Suppose you want to record a macro to open workbooks you use every day when you start Excel. You can create an Auto_Open macro to do that. You may also want to run a macro automatically when opening a workbook.

Before you get started, make sure the Developer tab is shown on the ribbon. If it’s not there, do the following:

  1. Click File > Options > Customize Ribbon.

  2. Under Customize the Ribbon, in the Main Tabs box, check the Developer box.

  3. Click OK.

To open workbooks automatically when Excel starts:

  1. Click Developer > Record Macro.

    Code group on the Developer tab

  2. In the Macro name box, type Auto_Open.

  3. In the Store macro in box, pick Personal Macro Workbook.

  4. This will make the macro available every time you open Excel.

  5. To remind you what this macro does, enter a description in the Description box. You can also leave this box blank.

  6. Click OK.

  7. Click File > Open, and select the files you work on every day. The files can be in multiple locations. Press Shift to select multiple files in the same folder.

  8. Click Developer > Stop Recording.

  9. When you close Excel, you’ll eventually be prompted to save the changes you’ve made to the Personal Macro Workbook. Click Yes so that your macro will run whenever you start Excel.

    Each time you start Excel, the workbooks you included in the macro will automatically open.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×