logo
search
VBA & Macro Problems

How to Delete or Edit a Macro Button in Excel

Muhammad TalhaMuhammad Talha Sep 25, 2026 870 views

Question details

The user needs to safely select and delete or edit an existing macro button in an Excel worksheet because its current label, description, or assigned macro is incorrect.

How to Delete or Edit a Macro Button in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Modifying or removing existing form controls and macro buttons embedded in a spreadsheet without accidentally triggering the VBA code.
Observed behavior
The user wants to remove or change a macro button but may struggle to select the button, as clicking it typically runs the assigned macro.
Before you start

Ensure that your Excel worksheet is not protected. If the sheet is protected, you will not be able to select, edit, or delete any form controls or macro buttons.

Solution 1Recommended

Delete the Macro Button Using Right-Click

The safest way to select and remove a macro button without running its underlying code.

When you try to click a macro button to delete it, Excel usually runs the macro instead. To safely select the button for deletion, you must use the right-click method to access its design mode.

1
Unprotect the worksheet

Go to the 'Review' tab on the Excel ribbon and click 'Unprotect Sheet'. If a password was previously set, enter it to unlock the sheet.

2
Select the button

Right-click the macro button. This action selects the button and opens a context menu without executing the macro.

3
Exit context menu

Press the 'Esc' key on your keyboard. This closes the context menu while keeping the button selected.

4
Delete the button

Press the 'Delete' or 'Backspace' key on your keyboard to permanently remove the button from the worksheet.

Delete the Macro Button Using Right-Click
Alternative Selection Method: You can also hold down the 'Ctrl' key and left-click the macro button to select it without running the macro.
Manage Macros Easily with WPS

Edit and Manage Macro Buttons in WPS Spreadsheet

WPS Office offers robust spreadsheet capabilities, including full support for VBA macros and form controls. You can easily insert, edit, and delete macro buttons with a familiar, user-friendly interface.

  1. 1. Open your macro-enabled file: Launch WPS Spreadsheet and open your .xlsm workbook.
  2. 2. Enable the Developer tab: Go to the 'Menu' > 'Options' > 'Customize Ribbon', and check the 'Developer' tab to access macro tools.
  3. 3. Select and edit the button: Right-click the existing macro button on your sheet to select it. You can now press Delete to remove it or choose 'Edit Text' to rename it.
  4. 4. Assign a new macro: Right-click the button and click 'Assign Macro' to link it to a different VBA script seamlessly within WPS.
Fully compatible with Microsoft Excel (.xlsx and .xlsm) macro-enabled files.Intuitive interface for managing form controls and assigned macros.Free, lightweight, and fast-loading spreadsheet application.Supports VBA macros for advanced data processing and automation.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the macro run when I try to delete the button?

By default, left-clicking a macro button is the trigger to run its assigned VBA script. To select the button for editing or deletion without executing the macro, you must either right-click it or hold down the 'Ctrl' key while left-clicking.

Why can't I select or right-click my Excel macro button at all?

Your worksheet is likely protected, which locks all form controls. Go to the 'Review' tab on your ribbon and select 'Unprotect Sheet'. Once unprotected, you will regain the ability to select, right-click, edit, and delete the buttons.

How do I add a new macro button after deleting the old one?

Navigate to the 'Developer' tab, click 'Insert', and choose the 'Button (Form Control)' icon from the drop-down menu. Click and drag on the worksheet to draw the new button, then select the macro you want to assign to it from the automatic prompt.