Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Display Macros in Excel: Step-by-Step Guide

· 6 min read · Smart Home

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To display macros in Excel, you need the Developer tab visible, then open the Macros dialog with Alt+F8 or the Developer tab's Macros button. If the Developer tab is missing, enable it via File > Options > Customize Ribbon and tick Developer in the right-hand list. That shows the full list of macros in the current workbook; to see the actual VBA code, open the Visual Basic Editor with Alt+F11 and use the Project Explorer. This guide walks through each method, plus how to show macro buttons on the sheet and how to keep macros from being hidden by security settings.

What You'll Need

  • Excel for Windows or Mac (the steps below are for the desktop app; Excel for the web cannot run or display VBA macros).
  • A workbook that contains macros, saved as .xlsm or .xlsb. Files saved as .xlsx cannot store macros.
  • Permission to change Excel options on your computer. On a managed work machine, some options may be locked by your administrator.

Step-by-Step

  1. Open the workbook that contains the macros. If you downloaded it, Excel may open it in Protected View. Click Enable Editing on the yellow bar first; otherwise the macro list will appear empty.
  2. Show the Developer tab. Go to File > Options. On Windows, select Customize Ribbon; on Mac, select Ribbon & Toolbar. In the right-hand list of main tabs, tick the Developer checkbox and click OK. The Developer tab now appears on the ribbon. Labels can differ slightly by Excel version and region.
  3. Open the Macros dialog. On the Developer tab, click Macros. The keyboard shortcut Alt+F8 (Windows) or Option+F8 (Mac) works from any tab. A small dialog opens listing every public macro in open workbooks.
  4. Choose where to look. At the bottom of the Macros dialog, open the Macros in dropdown. Pick All Open Workbooks to see everything, or select a specific workbook to narrow the list. Macros that take arguments or are marked Private will not appear here; that is normal.
  5. Read the list. Each entry shows the macro name, usually prefixed with the module or sheet name. Select one to see its description (if the author added one) and use the Run, Step Into, Edit, or Delete buttons. Delete removes the macro permanently, so be careful.
  6. View the actual code. To see what a macro does, select it and click Edit, or press Alt+F11 (Windows) or Option+F11 (Mac) to open the Visual Basic Editor. In the Project Explorer pane on the left, expand the workbook, then Modules, and double-click a module to display its code in the main window. If the Project Explorer is hidden, use View > Project Explorer inside the editor.
  7. Display macros as buttons on the sheet (optional). On the Developer tab, click Insert, then choose the Button form control under Form Controls. Draw the button on the sheet. The Assign Macro dialog appears; pick the macro and click OK. To change it later, right-click the button and choose Assign Macro.
  8. Check macro security if the list is empty. Go to File > Options > Trust Center > Trust Center Settings > Macro Settings. The Disable all macros without notification option hides macros silently. Choose Disable all macros with notification or Enable all macros (only for workbooks you trust), then reopen the file. On Mac, the path is Excel > Preferences > Security.

Common Mistakes

  • Looking for macros in an .xlsx file. That format cannot store VBA. If the workbook was saved as .xlsx, the macros were stripped when it was saved. You need the original .xlsm copy.
  • Forgetting Protected View. A downloaded file opens read-only until you click Enable Editing, and macros stay hidden until then.
  • Confusing the Macros dialog with the code. Alt+F8 lists macro names; it does not show the code. Use Alt+F11 or the Edit button for that.
  • Expecting macros in Excel for the web. The browser version cannot run or display VBA macros. Open the file in the desktop app.
  • Deleting instead of editing. The Delete button in the Macros dialog removes the macro from the workbook with no undo. Use Edit to inspect it instead.

Tips

  • Give macros descriptive names and add a description in the Visual Basic Editor (Tools > Macros or the Properties window) so the Macros dialog is easier to read.
  • Use Alt+F8 as a quick check: if a macro does not appear there, it is either Private, takes arguments, or lives in a workbook that is not open.
  • Keep a backup copy of any .xlsm workbook before editing or deleting macros; there is no undo for macro deletion.
  • If you only need to see which macros exist, the Developer tab's Macros button is faster than opening the editor.
  • When sharing a workbook, tell recipients to enable macros only if they trust the source. Macros can run harmful code.

Troubleshooting

  • The Macros button is greyed out. The workbook is probably in Protected View or read-only. Click Enable Editing, or check File > Info for a read-only notice.
  • The list is empty but you know macros exist. Check the Macros in dropdown is set to All Open Workbooks, then review Macro Settings in the Trust Center as described above. Also confirm the file is .xlsm or .xlsb.
  • The Developer tab will not stay visible. On managed computers, group policy can reset ribbon customisation. Ask your IT administrator; the Alt+F8 and Alt+F11 shortcuts still work.
  • The Visual Basic Editor opens but shows no code. In the Project Explorer, expand the correct workbook and the Modules folder. Code may also sit in a sheet module or ThisWorkbook; double-click those to view it.
  • A macro runs but does nothing visible. It may be waiting for input or acting on a different sheet. Use Step Into in the Macros dialog to run it line by line and see where it stops.
  • If that did not work, close and reopen Excel, then try a copy of the workbook in a local folder rather than a network drive. As a last resort, reinstall Office from the official source; do not use third-party macro tools or cracked add-ins.

Frequently Asked Questions

Why can't I see the Developer tab?

It is hidden by default. Enable it in File > Options > Customize Ribbon (Windows) or Ribbon & Toolbar (Mac) by ticking Developer in the right-hand list.

Can I view macros in Excel for the web?

No. Excel for the web cannot run or display VBA macros. Open the workbook in the desktop app to see them.

What is the difference between Alt+F8 and Alt+F11?

Alt+F8 opens the Macros dialog, which lists macro names and lets you run them. Alt+F11 opens the Visual Basic Editor, where you can read and edit the actual code.

Why does the macro list show nothing even though the file has macros?

Usually the file is in Protected View, saved as .xlsx, or macro security is set to disable macros without notification. Enable editing, confirm the file type, and check Trust Center macro settings.

Can I show a macro as a button on the sheet?

Yes. On the Developer tab, click Insert, choose the Button form control, draw it on the sheet, and assign the macro in the dialog that appears.

Does deleting a macro in the Macros dialog remove the code?

Yes, it removes the macro from the workbook permanently. There is no undo, so keep a backup before deleting.