How to Delete or Edit a Macro Button in Excel
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.

- 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.
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.
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.
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.
Right-click the macro button. This action selects the button and opens a context menu without executing the macro.
Press the 'Esc' key on your keyboard. This closes the context menu while keeping the button selected.
Press the 'Delete' or 'Backspace' key on your keyboard to permanently remove the button from the worksheet.

Edit the Macro Button Label or Assignment
Modify the text or change the macro assigned to an existing button instead of deleting it entirely.
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. Open your macro-enabled file: Launch WPS Spreadsheet and open your .xlsm workbook.
- 2. Enable the Developer tab: Go to the 'Menu' > 'Options' > 'Customize Ribbon', and check the 'Developer' tab to access macro tools.
- 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. Assign a new macro: Right-click the button and click 'Assign Macro' to link it to a different VBA script seamlessly within WPS.

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.




