VBA & Macro Problems

Fix Excel Buttons Opening in Design Mode Instead of Running Macros

Amos GikundaAmos Gikunda Nov 3, 2026 868 views

Question details

The user needs to make Excel form control buttons run their assigned VBA macros instead of entering edit mode upon being clicked.

How to Fix Excel Buttons Opening in Design Mode Instead of Running Macros
Product
Microsoft Excel 365
Device & OS
not provided
Scenario
Clicking interactive buttons that are configured to trigger VBA macros in a workbook.
Observed behavior
The buttons enter editing mode (Design Mode) when clicked, even when Design Mode is turned off in the Developer tab, failing to execute the intended macros.
Before you start

Ensure that macros are enabled in your workbook's Trust Center settings and that the VBA code itself does not contain compilation errors before troubleshooting the buttons.

Solution 1Recommended

Reassign the VBA Macro to the Button

Reconnect the disconnected VBA macro to the problematic button to restore its clickable execution functionality.

In Excel 365, buttons can occasionally become disconnected from their assigned macros due to workbook updates, copy-pasting issues, or temporary glitches. When a button loses its macro assignment, Excel defaults to selecting the shape (entering edit mode) rather than executing an action.

Manually reassigning the macro forces Excel to recognize the shape as an executable form control again.

1
Select the Button

Right-click on the problematic button that is entering edit mode. This action will select the button and open the context menu without triggering the edit mode.

2
Open the Assign Macro Menu

From the right-click context menu, click on 'Assign Macro...' to open the assignment dialog box.

3
Choose the Correct Macro

In the Assign Macro dialog window, scroll through the list of available macros and select the exact VBA macro name that should run when the button is clicked.

4
Apply and Test

Click 'OK' to save the assignment. Click anywhere on a blank cell in the worksheet to deselect the button, then left-click the button to verify it now runs the macro instead of opening in Design Mode.

Tip: If the macro name is missing from the list, open the VBA Editor (Alt + F11) to ensure the macro is written in a standard Module and is not marked as 'Private'.
Seamless Macro Management

Handle VBA Macros and Form Controls with WPS Spreadsheet

WPS Office provides robust support for VBA macros and form controls. You can easily link your automation scripts to buttons without experiencing persistent design mode glitches, ensuring a smooth workflow.

  1. 1. Enable Developer Tools: Open WPS Spreadsheet, go to the settings menu, and ensure the Developer tab is enabled in your ribbon.
  2. 2. Insert a Form Control Button: Navigate to the Developer tab, click on 'Insert', select the 'Button' form control, and draw it on your spreadsheet.
  3. 3. Assign the VBA Macro: Right-click the newly created button, select 'Assign Macro', choose your desired VBA script from the list, and click OK to finalize.
Fully compatible with Microsoft Excel macro-enabled workbooks (.xlsm)Stable form controls that switch reliably between design and execution modesIntuitive Developer tab for straightforward VBA scriptingFree and lightweight alternative to Microsoft Office
QA img-9

Frequently Asked Questions

Why does my Excel button keep selecting instead of clicking?

This happens when the button is actively in Design Mode, or if the button has lost its macro assignment. If Design Mode is off but it still selects the button, right-click it and use 'Assign Macro' to reconnect it to your script.

How do I turn off Design Mode in Excel?

Go to the Developer tab on the Excel ribbon and look for the 'Design Mode' icon in the Controls group. If it is highlighted, click it once to toggle it off. This will allow your form controls to function normally.

Can I run macros if the workbook is not saved as a macro-enabled file?

No, to save and run VBA macros consistently across sessions, the workbook must be saved as an Excel Macro-Enabled Workbook (.xlsm) or an Excel Binary Workbook (.xlsb). Standard .xlsx files will strip out the VBA code.

Does WPS Office support Excel VBA macros?

Yes, WPS Office provides excellent compatibility with Excel VBA macros. You can run, edit, and assign macros to form control buttons in WPS Spreadsheet using the built-in Developer tools.