Your Excel macro is missing because it wasn’t added to the personal macro workbook or the macro security settings are blocking it. Here’s the fastest fix: open the VBA editor (Alt+F11), check if your macro exists under ThisWorkbook or Personal.xlsb, then run it directly or add it to the list using Application.Macros. If that fails, re-enable macros in Trust Center settings.

What You'll Need

  • Excel installed (Windows or Mac version)
  • Access to the file containing your macro
  • The macro name (check the original code or code window title)
  • Administrator/owner access if macros were disabled by IT policy

Step-by-Step

  1. Verify the macro exists
    Press Alt+F11 to open the VBA Editor. In the Project Explorer window (left panel), look for:
    • ThisWorkbook – if the macro runs when opening the file
    • Personal.xlsb – if it’s saved in your personal workbook
    • A module named after your file or Module1
    If you don’t see it, the macro was never saved or was accidentally deleted.
  2. Check macro security settings
    In Excel, go to:
    • File > Options > Trust Center > Trust Center Settings (Windows)
    • Excel > Preferences > Security > Enable macros (Mac)
    Select Enable all macros (temporarily) to test. Save changes. Restart Excel if prompted.
  3. Add the macro to the list manually
    If the macro appears in VBA but doesn’t show in View > Macros:
    1. Press Alt+F8 to open the Macro dialog
    2. Click Macros in the dropdown (if available)
    3. Select All to see hidden macros
    4. If your macro isn’t listed, use VBA to add it:
      Sub AddMissingMacroToList()
          Dim wkb As Workbook
          Dim wbkPersonal As Workbook
          Set wkb = ThisWorkbook
          Set wbkPersonal = Workbooks("Personal.xlsb") 'or your workbook name
          Application.Macros.Add Name:="YourMacroName", Category:="Custom", Description:=""
      End Sub
  4. Enable the personal macro workbook
    The Personal.xlsb file stores macros you mark as "personal." If it’s missing:
    1. Open VBA Editor (Alt+F11)
    2. Go to Tools > References
    3. Check if Microsoft Excel Object Library and VBA Extensibility are enabled
    4. If Personal.xlsb is missing, create it:
      Dim pb As Workbook
      Set pb = Workbooks.Add(Template:=ThisWorkbook.Path & "\Personal.xlsb")
  5. Rebuild the macro list cache
    Sometimes Excel’s macro cache gets corrupted. To fix:
    1. Close Excel completely (end all Excel processes in Task Manager or Activity Monitor)
    2. Delete the file:
      • Windows: %AppData%\Microsoft\Excel\XLSTART\
      • Mac: ~/Library/Application Support/Microsoft/Office/User Templates/My Templates/
    3. Restart Excel and re-enable macros (as in Step 2)

Common Mistakes

Users often miss these hidden causes for missing macros:

  • Macros saved in a different workbook – if you copied the code but didn’t save it to the right file, it won’t appear in the list
  • Macro security disabled by IT – even if you enable macros, group policies may override this. Check with your admin.
  • Typo in the macro name – VBA is case-sensitive when calling macros. Verify the exact name in the code editor.
  • Running Excel in Safe Mode – some macros won’t load. Disable Safe Mode via Excel.exe /safe (Command Prompt)
  • Corrupted workbook – if the file has errors, macros may fail to load. Test in a new blank workbook.

Tips

  • Use the Macro Recorder to ensure your macro is saved in the right workbook. Go to Developer > Record Macro (enable the Developer tab in File > Options > Customize Ribbon)
  • Test macros in a blank workbook to isolate whether the issue is file-specific or Excel-wide.
  • Check for add-ins interfering. Disable all add-ins (File > Options > Add-ins > Go) and see if the macro appears.
  • Use shortcuts to run macros without opening the Macro dialog. Assign a keyboard shortcut via VBA:
    Application.OnKey "^+M", "YourMacroName"
    (This requires enabling macros and testing in a safe environment.)
  • Backup your Personal.xlsb before modifying it. It stores macros across workbooks.

Troubleshooting

If that did not work:

  1. Repair Excel installation
    • Windows: Go to Control Panel > Programs > Programs and Features > Excel > Change > Quick Repair
    • Mac: Reinstall via Launchpad > Microsoft Excel > Reinstall
  2. Check for conflicting updates
    • Roll back the last Windows update or Excel update via Settings > Windows Update > Update History
    • On Mac, check for Office updates (Excel > Help > Check for Updates)
  3. Recreate the macro
    • Open VBA (Alt+F11), delete the existing macro code, then re-enter it
    • Save the workbook as a new file to ensure no corruption
  4. Use PowerShell/Cmd to force-enable macros (Windows only) Run in Command Prompt (Admin):
    reg add "HKCU\Software\Microsoft\Office\16.0\Excel\Options" /v EnableMacroMessageBox /t REG_DWORD /d 1 /f
    (Replace 16.0 with your Office version number from File > Account > About Excel)
  5. Contact support If macros still don’t appear and none of the above works: Provide:
    • Excel version (from File > Account)
    • OS version
    • Steps you’ve already tried

Frequently Asked Questions

Why does my macro show up in VBA but not in the Macro list?

The macro list is generated by Excel’s internal cache, which sometimes fails. The fastest fix is to add it manually via VBA (Step 3) or delete the XLSTART folder (Step 5) to rebuild the cache.

Can I run a macro without enabling all macros?

Only if the macro is digitally signed or saved in Personal.xlsb. To test:

  1. Open VBA, locate your macro in Personal.xlsb
  2. Right-click the macro name > Run Sub/UserForm
  3. If it runs, it’s safe to mark it as "trusted" in Trust Center settings

How do I find out if my macro was deleted?

Check the file’s Version History (Windows) or Autosave (Mac) in File > Info. For VBA, look at the Project Explorer in the Editor (Alt+F11); deleted macros leave empty modules. You can recover them if the file wasn’t overwritten.

Why does my macro work in one file but not another?

This typically means:

  1. The macro is saved in the wrong workbook (e.g., ThisWorkbook vs. a module in another file)
  2. Different macro security levels are applied to each file
  3. The second file has disabled VBA references (go to Tools > References in VBA)
Check both files’ VBA projects to match the locations.

Can I move a macro from one workbook to another?

Yes, but carefully:

  1. Copy the module code (select all code in the Editor, right-click > Copy)
  2. Open the target workbook, press Alt+F11, right-click in the Project Explorer > Insert > Module
  3. Paste the code into the new module
  4. If it’s a ThisWorkbook macro, recreate it in the new file’s VBA project
Avoid copying entire modules directly, as this can cause conflicts.

What if my macro is saved in a password-protected workbook?

You’ll need to:

  1. Open the file in Protected View (enable it in Excel Options > Trust Center > Protected View)
  2. Use VBA to extract the code (requires knowing the password):
    Dim wb As Workbook
    Dim pwd As String
    Set wb = Workbooks.Open("YourFile.xlsx", , False, "YourPassword")
  3. Copy the code to a new workbook without protection
  4. Save the new workbook and re-enable macros
If you don’t know the password, you’ll need to reset it via File > Info > Protect Workbook > Remove Password (if the workbook was originally password-protected).