Macro Buttons Not Working in Excel (4 Quick Fixes)

Macro buttons are a convenient way to run VBA scripts in Excel with a single click, but sometimes they stop responding unexpectedly. You might click a button and nothing happens, even though it looks fine on the worksheet. This can happen due to security settings, file format issues, or broken links between the button and its assigned macro. Other common reasons include leaving Design Mode enabled for ActiveX controls or opening the workbook from an untrusted location, which can block macros from running

In this article, you’ll learn the five most common causes of macro buttons not working and how to fix them step by step. By following these solutions, you can restore full functionality to your buttons and ensure your macros run smoothly.

Key Takeaways

Enable your workbook as XLSM to run macros properly for buttons:

➤ A workbook saved as .xlsx cannot store or run VBA macros, so buttons assigned to macros will not work
➤Saving the workbook as .xlsm enables macro functionality and allows buttons to execute their assigned macros
➤After saving as .xlsm, test functionality with this simple macro:

Sub TestMacroEnabled()
    MsgBox "The workbook is now macro-enabled!"
End Sub

➤Assign the macro to a Form Control button using Assign Macro
➤Clicking the button should display the message box “The workbook is now macro-enabled!”

overview image

Download Practice Workbook
1

Enable Macros in Trust Center

One of the most common reasons macro buttons don’t work in Excel is that macros are disabled in the Trust Center. If this setting is turned off, clicking a macro button will appear to do nothing. By enabling macros, you allow Excel to run all assigned VBA scripts, ensuring your buttons work as intended.

This is the dataset we will be using to demonstrate the methods:

Enable Macros in Trust Center

Using our dataset, enabling macros will allow buttons assigned to macros like HighlightTopPerformers, ClearHighlighting, or SortByScore to execute their actions without any restriction.

Steps:

➤ Open Excel and go to File >> Options >> Trust Center >> Trust Center Settings

Enable Macros in Trust Center

➤ Click Macro Settings
➤ Select Enable all macros (not recommended; potentially dangerous code can run) or Disable all macros with notification to allow manual enabling
➤ Click OK to save the settings

Enable Macros in Trust Center

Explanation
➧ Excel disables macros by default for security reasons
➧ Enabling macros allows all macro buttons in your workbook to function correctly
➧ After enabling and assigning the test macro, clicking the button confirms that macros are now running

➤ Press  Alt  +  F11  , go to Insert >> Module, and paste this macro to test the button:

Sub TestMacroButton()
    MsgBox "The macro button is now working!"
End Sub

Enable Macros in Trust Center

➤ Create a Form Control button, and in the Assign Macro pop-up, select TestMacroButton

Enable Macros in Trust Center

➤ Click the button; a message box saying “The macro button is now working!” should appear

Enable Macros in Trust Center


2

Save Workbook as Macro-Enabled (.xlsm)

A common reason macro buttons don’t work in Excel is that the workbook is saved in the .xlsx format, which does not support macros. Even if you have assigned macros to buttons, Excel will ignore them in a standard .xlsx file.

Using our dataset, if the workbook is saved as .xlsm, buttons assigned to macros like HighlightTopPerformers, ClearHighlighting, or SortByScore will work properly and execute their assigned actions.

Steps:

➤ Click File >> Save As
➤ In the Save as type dropdown, select Excel Macro-Enabled Workbook (*.xlsm)
➤ Choose a file location and click Save

Save Workbook as Macro-Enabled (.xlsm)

Explanation
➧ The .xlsx format does not store or run VBA macros, so buttons assigned to macros won’t work
➧ Saving as .xlsm enables macro functionality in the workbook
➧ Once saved in this format, all macro buttons in the workbook will execute correctly

➤ Press  Alt  +  F11  , go to Insert >> Module, and paste this macro to test:

Sub TestMacroEnabled()
    MsgBox "The workbook is now macro-enabled!"
End Sub

Save Workbook as Macro-Enabled (.xlsm)

➤ Create a Form Control button on your worksheet and in the Assign Macro pop-up, select TestMacroEnabled

Save Workbook as Macro-Enabled (.xlsm)

➤ Click the button; a message box saying “The workbook is now macro-enabled!” should appear

Save Workbook as Macro-Enabled (.xlsm)


3

Reassign the Macro to the Button

Sometimes macro buttons stop working because they have lost their link to the assigned macro. This can happen if the macro was renamed, deleted, or the workbook was copied. Even though the button is visible, clicking it won’t execute anything until the connection is restored.

Using our dataset, if a button previously assigned to the HighlightTopPerformers macro stops working, reassigning it ensures that clicking the button will once again highlight employees with scores ≥ 90.

Steps:

➤ Press  Alt  +  F11  , go to Insert >> Module, and paste this macro to test:

Sub TestMacroReassign()
    MsgBox "Macro reassigned successfully!"
End Sub

Reassign the Macro to the Button

➤ Right-click the button on your worksheet
➤ Select Assign Macro from the context menu

Reassign the Macro to the Button

➤ In the pop-up, choose the correct macro (e.g., TestMacroReassign)
➤ Click OK to re-link the macro

Reassign the Macro to the Button

Explanation
➧ Buttons can lose their macro references if changes are made to the code or workboo
➧ Reassigning the macro restores functionality to the button
➧ After reassignment, the button will execute the macro exactly as intended

4

Turn Off Design Mode (for ActiveX/Controls)

If you are using an ActiveX button in Excel, clicking it may not run the assigned macro because Design Mode is turned on. When Design Mode is active, Excel treats clicks as editing or moving the control rather than executing the macro, making the button appear unresponsive.

Using our dataset, turning off Design Mode allows buttons assigned to macros like SortByScore or HighlightTopPerformers to function properly, executing the macro code when clicked.

Steps:

➤ Go to the Developer tab on the ribbon
➤ Locate the Design Mode button and ensure it is not highlighted (click it to toggle off if needed)

Turn Off Design Mode (for ActiveX/Controls)

➤ Click the ActiveX button again to run the assigned macro

Turn Off Design Mode (for ActiveX/Controls)

Explanation
➧ Design Mode is intended for editing ActiveX controls, not running them
➧ If it’s on, macros assigned to ActiveX buttons will not execute
➧ Turning off Design Mode restores the button’s functionality so it runs its macro when clicked

Frequently Asked Questions

Why do macro buttons sometimes stop working in Excel?

Macro buttons can stop working if macros are disabled, the workbook is not saved as .xlsm, the button loses its macro link, Design Mode is on for ActiveX controls, or the file is blocked/untrusted.

How can I re-enable macros if they are disabled?

Go to File >> Options >> Trust Center >> Trust Center Settings >> Macro Settings, then select Enable all macros or Disable all macros with notification to allow Excel to run macros.

What should I do if the macro button loses its assigned macro?

Right-click the button and choose Assign Macro to reconnect it to the correct macro in your workbook.

Why do ActiveX buttons sometimes not run macros?

ActiveX buttons require Design Mode to be turned off. If Design Mode is on, clicks will only select or edit the button instead of running the macro.

How do I fix macro buttons in downloaded or network files?

Right-click the file >> Properties >> Unblock, or add the folder as a Trusted Location in Excel’s Trust Center to allow macros to run.


Wrapping Up

Macro buttons in Excel provide a fast and convenient way to run VBA scripts, but they can stop working due to security settings, file formats, broken macro links, or blocked/untrusted files. By following the five solutions outlined, enabling macros, saving the workbook as .xlsm, reassigning macros, turning off Design Mode, and trusting/unblocking the workbook location, you can restore full functionality to your buttons.

ExcelInsider Team
We will be happy to hear your thoughts

Leave a reply

Excel Insider
Logo