Skip to main content

Kutools for Office — One Suite. Five Tools. Get More Done.

How to remove all buttons or Command buttons in Excel?

Author Siluvia Last modified

In some Excel workbooks, you may have added many buttons—such as form control buttons or ActiveX command buttons—to perform different tasks or automate processes. Over time, you might need to remove these buttons, whether due to changes in the worksheet design, template cleanup, or preparing the file for sharing. If there are multiple buttons scattered across a worksheet, removing them manually can be very time-consuming and prone to error. This article introduces several practical approaches to efficiently remove all form control buttons or command buttons from an active sheet in Excel, helping you quickly tidy up your workbook and prevent unnecessary interactions or confusion for other users.

Remove all buttons using Go To Special
Remove all buttons including form control buttons and command buttons by selecting them all
Remove all buttons including form control buttons and command buttons by VBA code
Remove all form control buttons or command buttons with VBA code


Remove all buttons using Go To Special

The easiest practical approach to removing buttons—particularly form control buttons—is to use the Go To Special feature in Excel. This method does not require VBA scripting and is suitable for users who prefer to avoid code but want more control than manual selection. It works best for form controls, but will not remove ActiveX controls.

1. Select any cell within your active worksheet, then press F5 to bring up the Go To dialog. Click Special in the dialog box.

2. In the next dialog, choose Objects, and click OK. All drawing objects—including form control buttons—will be immediately selected on your worksheet.

3. Press the Delete key to remove all selected buttons and objects.

Tips: This method will select all objects, including shapes, text boxes, and images, not just form controls. Carefully review your worksheet before pressing Delete if you have other important objects. If you have both form control buttons and ActiveX controls, this method will only remove the former; you will need to use VBA to delete ActiveX controls.


Remove all buttons including form control buttons and command buttons by selecting them all

One straightforward way to remove all buttons, including form control and command buttons, from the active worksheet is to select and delete them all at once. This method is suitable for users who prefer a direct visual approach or need to quickly clear all interactive objects from a worksheet. It does not require any coding knowledge or special setup, making it ideal for simple cleanup tasks where all controls need to be removed at once.

When using this approach, keep in mind that it will select and potentially delete all objects—including shapes, charts, images, and other controls—on the worksheet. Use caution if you wish to retain certain items that are not buttons.

1. Enable the Design Mode by clicking Developer > Design Mode on the ribbon. This step ensures that both form control buttons and ActiveX controls can be selected and managed. If you don't see the Developer tab, you may need to enable it in File > Options > Customize Ribbon.

A screenshot of Excel showing how to enable Design Mode on the Developer tab

2. Click on one of the buttons (either form control or command button) on the worksheet to select it. Then, while holding down the Ctrl key, press the A key (Ctrl + A) to select all buttons and other objects present in the active worksheet.

A screenshot showing all buttons selected in Excel using Ctrl + A

3. Once all the items are selected, press the Delete key. This action will remove all selected buttons and any other selected objects from the worksheet immediately.

Note: This method will also select and delete shapes, images, charts, and any other objects present on the worksheet along with the buttons. Carefully review your selection before deleting to ensure you are not removing objects you wish to keep. If you only want to delete specific buttons and not all objects, consider using the VBA methods described below.


Remove all buttons including form control buttons and command buttons by VBA code

If you want a faster and more precise solution that doesn’t risk deleting unintended objects, you can use VBA code to programmatically remove all buttons from the active worksheet. This approach is efficient for workbooks containing numerous buttons and when you want to minimize manual effort. VBA can help avoid accidental deletion of other shapes and ensure consistency across multiple worksheets. However, a basic understanding of VBA and access to the Developer tools are required.

1. Open the worksheet containing the buttons you want to remove. Press Alt + F11 to launch the Microsoft Visual Basic for Applications (VBA) editor.

2. In the Microsoft Visual Basic for Applications window, click Insert > Module. Copy and paste the following VBA code into the Module window.

VBA code: Remove all buttons from active sheet

Sub Clear_ButtonsActiveSheet()
    Dim I As Long
    Dim xOLE As Object
    On Error Resume Next
    ActiveSheet.Buttons.Delete
    For Each xOLE In ActiveSheet.OLEObjects
        If TypeName(xOLE.Object) = "CommandButton" Then
            xOLE.Delete
        End If
    Next
End Sub

3. Press the F5 key or click the Run button to execute the code. Instantly, all types of buttons—including both form controls and command buttons—will be removed from the currently active worksheet.

Tips: Before running the code, it's advisable to save your workbook to prevent unintentional data loss. This VBA script is best used when you want to clear every button from a sheet. If you need to target only certain types of buttons, refer to the alternative VBA methods below. If the worksheet is protected, you may need to unprotect it first to allow the code to delete objects. After running the code, review your worksheet to ensure only the intended controls have been removed.


Remove all form control buttons or command buttons with VBA code

In some cases, you may need to remove only specific types of buttons—either just the form control buttons or only the ActiveX command buttons, while retaining the other kind. This can help you fine-tune the worksheet functionality without affecting unrelated objects. Below are separate VBA solutions for each scenario, giving you greater control over which buttons are deleted.

1. Open the worksheet containing the buttons you want to selectively remove, then press Alt + F11 to open the Microsoft Visual Basic for Applications window.

2. In the VBA editor, click Insert > Module to create a new module, and then copy and paste one of the following VBA codes, depending on the type of buttons you want to remove.

VBA code: Remove all form control buttons from active sheet

Sub Clear_ButtonsActiveSheet()
    ActiveSheet.Buttons.Delete
End Sub

VBA code: Remove all command buttons from active sheet

Sub Clear_ButtonsActiveSheet()
    Dim xOLE As Object
    On Error Resume Next
    For Each xOLE In ActiveSheet.OLEObjects
        If TypeName(xOLE.Object) = "CommandButton" Then
            xOLE.Delete
        End If
    Next
End Sub

3. After pasting the appropriate VBA code, press F5 or click the Run button to execute. Your worksheet will instantly have all form control buttons or all ActiveX command buttons removed, depending on which script you used.

When using these codes, make sure you are running the correct one for your needs. These scripts only target one button type at a time. If you have a combination of both and want to remove each type, run both scripts consecutively. Check your worksheet layout after the code runs to verify that only the intended controls have been deleted, especially if your sheet includes other shapes or embedded objects. Always save your workbook before using VBA to prevent unexpected loss of unrelated content.

In summary, Excel provides various ways to remove buttons—either manually, using Go To Special, or through VBA scripts—so you can choose the most suitable method for your scenario. If you encounter issues such as certain buttons being unremovable, ensure the worksheet is not protected, or check if the controls are part of grouped objects. For batch deletions or when you frequently need to remove controls from multiple sheets, leveraging VBA scripts can save considerable time. Always remember to save a backup of your workbook before making bulk deletions to ensure you can restore important content if necessary.


Related articles:

Best Office Productivity Tools

🤖 Kutools AI Aide: Revolutionize data analysis based on: Intelligent Execution   |  Generate Code  |  Create Custom Formulas  |  Analyze Data and Generate Charts  |  Invoke Kutools Functions
Popular Features: Find, Highlight or Identify Duplicates   |  Delete Blank Rows   |  Combine Columns or Cells without Losing Data   |   Round without Formula ...
Super Lookup: Multiple Criteria VLookup    Multiple Value VLookup  |   VLookup Across Multiple Sheets   |   Fuzzy Lookup ....
Advanced Drop-down List: Quickly Create Drop Down List   |  Dependent Drop Down List   |  Multi-select Drop Down List ....
Column Manager: Add a Specific Number of Columns  |  Move Columns  |  Toggle Visibility Status of Hidden Columns  |  Compare Ranges & Columns ...
Featured Features: Grid Focus   |  Design View   |   Big Formula Bar    Workbook & Sheet Manager   |  Resource Library (Auto Text)   |  Date Picker   |  Combine Worksheets   |  Encrypt/Decrypt Cells    Send Emails by List   |  Super Filter   |   Special Filter (filter bold/italic/strikethrough...) ...
Top 15 Toolsets12 Text Tools (Add Text, Remove Characters, ...)   |   50+ Chart Types (Gantt Chart, ...)   |   40+ Practical Formulas (Calculate age based on birthday, ...)   |   19 Insertion Tools (Insert QR Code, Insert Picture from Path, ...)   |   12 Conversion Tools (Numbers to Words, Currency Conversion, ...)   |   7 Merge & Split Tools (Advanced Combine Rows, Split Cells, ...)   |   ... and more
Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time.  Click Here to Get The Feature You Need The Most...


Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier

  • Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
  • Open and create multiple documents in new tabs of the same window, rather than in new windows.
  • Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!

All Kutools add-ins. One installer

Kutools for Office suite bundles add-ins for Excel, Word, Outlook & PowerPoint plus Office Tab Pro, which is ideal for teams working across Office apps.

Excel Word Outlook Tabs PowerPoint
  • All-in-one suite — Excel, Word, Outlook & PowerPoint add-ins + Office Tab Pro
  • One installer, one license — set up in minutes (MSI-ready)
  • Works better together — streamlined productivity across Office apps
  • 30-day full-featured trial — no registration, no credit card
  • Best value — save vs buying individual add-in