How to Fix Macros Not Working in Excel (2026 Guide)

5 mins read

Updated on 2026-07-10 10:33:08 to Corrupted File Repair

Macros not working in Excel is one of the most frustrating issues for users who rely on automation to boost productivity. Whether you encounter the “Cannot run the macro” error, disabled buttons, or VBA code that suddenly stops responding, these problems can halt your workflow instantly. In this 2026 guide, we’ll walk you through 6 proven solutions to quickly fix macros not working in Excel on Windows 11 and older versions.

Why Are Macros Not Working in Excel?

Macros not working in Excel can be due to a recent update, automatic disabling, or the Excel file containing content from other sources. Here are the common symptoms you might come across:

  • Excel Macros Not Working After Update: Sometimes you come across the " Cannot run the macros error in Excel due to a Microsoft Office update that blocks macros from various files and sources.
  • SharePoint Excel Macros Not Working: Macros may not work as expected when an Excel workbook is stored in SharePoint. It's primarily because of security policies that treat the workbook as an untrusted source.
  • Macros Not Running from Network Drive: If you have not added your network location as a trusted one, you'll see macros not working in Excel, preventing VBA code from execution.
  • Excel Macros Not Working in Browser (Excel Online limitations): Note that macro functionality is available only on desktop versions, and you will see Excel macros not working even after enabling notifications when using them in a browser.

How to Enable Macros in Excel in Trust Center (Basic Fix)

To fix Excel macros not working in Windows 11, update your Trust Center settings. This will allow macros to run smoothly across all your workbooks and automatically permit VBA execution. Here are the steps for this:

  • Open Excel > File > Options.

  • From the left side, choose Trust Center and then Trust Center Settings.

    excel trust center settings
  • Click Macros Settings in the left panel of the Trust Center Window.

  • Choose the right option and click OK.

    enable excel macros

⚡ How to Fix Excel Macros Not Working (6 Ways)

To fix the Excel macros button not working or other issues, you should save the workbook in a macro-enabled format, reassign the macro button, or repair corrupted Excel files. Let's discuss these in detail:

Fix 1. Save Workbook as Macro-Enabled Format (.xlsm)

Often, you have enabled the macros, but they don't run because you saved the file in the wrong format. The following steps guide you on saving a workbook as macro-enabled:

  • Open the ribbon or worksheet. Go to File > Save As.

  • Choose the file type Excel Macro-Enabled Workbook (.xlsm) and click Save.

    save workbook as macro enabled workbook

Fix 2. Re-assign the Macro to the Button

If you renamed a macro or edited its underlying code, you need to reassign it to the button so all automated workflows run smoothly. Here's how you can do it:

  • Open the Excel workbook that contains the macro button.

  • Right-click the button that is not working and select Assign Macro from the context menu.

    select excel assign macro
  • In the Assign Macro window, choose the correct macro from the list.

  • Click OK to save the change.

    reassign excel macro button to fix macro not working error
  • Click the button again to check whether the macro runs properly.

If the button is an ActiveX control, right-click it and choose View Code instead. Then make sure the correct VBA code is placed inside the button’s Click event.

Fix 3. Repair Corrupted Excel Files

Often, your Excel files become corrupted when you shut down the file or computer while a file is being saved, or when a hard drive fails. One of the reasons macros do not work in Excel can be corrupted files since they have a broken Visual Basic for Applications (VBA) code or render the macro-enabled workbook (.xlsm) unreadable.

To fix this, you should use 4DDiG File Repair, which is fast and reliable. It can repair blank files that won't open or contain gibberish and supports a wide range of formats, including Excel, Word, PowerPoint, ZIP, RAR, EPUB, PDF, PSD, PSB, and more. Meanwhile, it addresses various file issues, such as file won’t open, opens blanks, corrupted, and more

FREE DOWNLOAD

Secure Download

FREE DOWNLOAD

Secure Download

Let's see the steps to use it to have your macros back running:

  • Open 4DDiG File Repair and choose File Repair from the left menu. Click Add Files to upload problem Excel files to 4DDiG

    add corrupted excel files to 4ddig
  • Press Repair All to kick off the Excel repair process

    repair all corrupted excel files
  • Let the tool analyze and fix Excel files, and once it's done, click Preview. Later, click Save All to remove the damage from your files.

    preview and save repaired excel files

Fix 4. Turn Off Design Mode

Design Mode in Excel is actually a particular state in which you can select, edit, and resize interactive elements or add VBA code. However, in this Mode, when you click a macro button, it only lets you edit the button, while VBA code execution remains suspended. Therefore, you should turn off the design mode by following the given steps:

  • Open Excel and click File.

  • Select Options.

  • Tap Customizable Ribbon from the left menu.

  • Under the Main Tabs, check the box next to Developer.

  • Click OK.

  • Click the Developer Tab and locate the Design Mode.

  • Check if it's highlighted; if so, tap it to toggle it off.

Fix 5. Unprotect Workbook/Worksheet

If you are handling official workbooks or worksheets, chances are that they will be protected to safeguard against accidental changes and damage. However, to run macros or regain access to editing options, you should unprotect the Excel workbook. The following are the steps that help you in this:

  • Open the Excel File on your computer.

  • Click the Review Tab available in the top ribbon.

  • There, you will see the Unprotect Sheet option; click it, and that's all.

    excel unprotect sheet

Some other ways to do it include using the format menu, a keyboard shortcut, or VBA.

Fix 6. Fix Missing VBA References

VBA references are links to external object libraries that allow your macros to use specific objects, methods, and functions from Excel, Outlook, Word, ActiveX controls, add-ins, or other applications. If a referenced library is missing, outdated, or unavailable on your computer, Excel may show errors such as “Can’t find project or library” and stop macros from running properly.

Here is how to fix missing VBA references in Excel:

  • Open the Excel workbook with the macro issue.

  • Press Alt + F11 to open the Visual Basic Editor.

  • In the VBA editor, click Tools > References.

    open visual basic preferences
  • In the Available References list, look for any item that starts with MISSING:.

  • Uncheck the box next to the missing reference if your macro no longer needs that library.

    excel vba missing reference dialog
  • If the macro still needs it, scroll through the list and select the correct available version of the same library.

  • If you cannot find the required library, click Browse and manually locate the related .dll, .tlb, .olb, .exe, .xlam, or add-in file.

  • Click OK to apply the change.

  • In the VBA editor, click Debug > Compile VBAProject to check whether the reference issue has been fixed.

  • Save the workbook as a macro-enabled file, such as .xlsm.

Conclusion

Macros not working in Excel can disrupt your entire productivity, but most issues can be resolved with the right steps. From enabling macros in Trust Center to repairing corrupted files with 4DDiG File Repair, these methods cover the most common causes. Try the solutions in order and get your automated workflows running smoothly again.

FREE DOWNLOAD

Secure Download

FREE DOWNLOAD

Secure Download

William Bollson (senior editor)

William Bollson, the editor-in-chief of 4DDiG, devotes to providing the best solutions for Windows and Mac related issues, including data recovery, repair, error fixes.

(Click to rate this post)

You rated 4.5 ( participated)