We can remove or delete checkbox on the worksheet or userform using ‘Go To Special’ or ‘Select Objects’ or by turning on Design Mode in Developer tab. when we don’t want to place checkbox control on the worksheet or userform we removes from there. Please find the more details and screenshots for clear understanding about remove checkbox control in the following chapter.
In this Topic:
- Remove a CheckBox on the Worksheet: Using Go To Special
- Remove a CheckBox on the Worksheet: Using Select Objects
- Remove a CheckBox on the Worksheet: Using Design Mode
- ReDeleteFormCheckboxesInRangemove Checkbox Controls using VBA
- Delete Form Checkboxes
- Delete ActiveX Checkboxes
- More about Checkbox control
Remove a CheckBox on the Worksheet: Using Go To Special
Please find the below example code, it will show you how to remove a checkbox on the worksheet using Go To Special from Editing. Go To Special command is used to sleet many types of control, one of those is objects. Please follow the below instructions to remove checkbox.
-
- Go To Home tab, click Find & Select (Editing). Now the following dialog box will be appeared. It is shown in the following screenshot.
- Choose the Objects option from the Go To Select command. And then click OK button.
- All of the check boxes have been selected. (If Worksheet contains any other objects, it will delete other objects als).
- Press the Delete key to delete check boxes on the keyboard.
- Once you click on the Delete button, all of the checkboxes will be deleted,
Remove a CheckBox on the Worksheet: Using Select Objects
Please find the below example code, it will show you how to remove a checkbox on the worksheet using Select Objects from Editing.
-
- Go To Home tab, click Find & Select (Editing), click Select Objects. It is shown in the following screenshot.
- Now, select the checkbox objects which you wanted to delete.
- Press the Delete key to delete check boxes on the keyboard.
- Once you click on the Delete button, all of the checkboxes will be deleted,
Remove a CheckBox on the Worksheet: Using Design Mode
Please find the below example code, it will show you how to remove a checkbox on the worksheet using Design Mode from Controls.
-
- Go To Developer tab, Click Design Mode(It Should be On). It is shown in the following screenshot.
- Now, select the checkbox objects which you wanted to delete.
- Press the Delete key to delete check boxes on the keyboard.
- Once you click on the Delete button, all of the checkboxes will be deleted,
Remove Checkbox Controls using VBA
Here is the VBA code to remove all Checkbox controls (Worksheet Form Controls) in active sheet.
Sub sbRemoveCheckboxesinActiveSheet_FormControls() For Each shp In ActiveSheet.Shapes If shp.Type = msoFormControl Then If shp.FormControlType = 1 Then shp.Delete End If Next End Sub
And below is the VBA Macro to remove all OLE Checkbox controls in active sheet.
Sub sbRemoveCheckboxesinActiveSheet_OLEControls() For Each shp In ActiveSheet.Shapes If shp.Type = msoOLEControlObject Then If shp.OLEFormat.Object.OLEType = 2 Then shp.Delete End If Next End Sub
Deleting Form Control Checkboxes
Form Control checkboxes are straightforward interactive elements in Excel, commonly used to facilitate binary choices. They are part of Excel’s standard toolset and are favored for their simplicity and ease of use. Integrated directly into the spreadsheet without requiring external libraries, Form Control checkboxes are often used in templates, forms, and surveys. Their graphical representation is basic, and their primary functionality is to present users with an “on” or “off” selection. When designing user interfaces in Excel or gathering basic user inputs, these checkboxes serve as a go-to choice for many spreadsheet creators.
Delete Form Checkboxes In Range
Deletes Form Control checkboxes within the specified range. Ideal for fine-tuning sections of large spreadsheets without affecting the entire sheet.
Sub DeleteFormCheckboxesInRange(rng As Range) Dim shp As Shape For Each shp In rng.Worksheet.Shapes If Not Intersect(rng, shp.TopLeftCell) Is Nothing Then If shp.TopLeftCell.Address = shp.BottomRightCell.Address And _ shp.Type = msoFormControl And shp.FormControlType = xlCheckBox Then shp.Delete End If End If Next shp End Sub
Delete Form Checkboxes In Sheet
Clears all Form Control checkboxes from a given worksheet. Perfect for refreshing or resetting an entire sheet without manually searching for checkboxes.
Sub DeleteFormCheckboxesInSheet(ws As Worksheet) Dim shp As Shape For Each shp In ws.Shapes If shp.Type = msoFormControl Then If shp.FormControlType = xlCheckBox Then shp.Delete End If End If Next shp End Sub
Delete Form Checkboxes In Workbook
Comprehensively removes Form Control checkboxes across all sheets in a workbook. Streamlines the process of cleansing an entire workbook filled with these checkboxes.
Sub DeleteFormCheckboxesInWorkbook(wb As Workbook) Dim ws As Worksheet For Each ws In wb.Worksheets DeleteFormCheckboxesInSheet ws Next ws End Sub
Deleting ActiveX Checkboxes
ActiveX checkboxes provide a more advanced and flexible option for binary selections in Excel. Unlike Form Control checkboxes, ActiveX controls can be easily customized, both in appearance and functionality. Originating from the ActiveX platform, these checkboxes can execute more complex VBA scripts, react to various events, and be styled in detail. They offer an enhanced level of interactivity, making them the preferred choice for more sophisticated Excel applications. However, with this advanced capability comes a steeper learning curve, particularly for users unfamiliar with the ActiveX environment or VBA programming.
Delete ActiveX Checkboxes In Range
Targets and deletes ActiveX checkboxes within a given range. Offers precision in complex sheets by addressing only the designated section.
Sub DeleteActiveXCheckboxesInRange(rng As Range) Dim obj As Object For Each obj In rng.Worksheet.OLEObjects If obj.progID = "Forms.CheckBox.1" And _ Not Intersect(rng, obj.TopLeftCell) Is Nothing Then obj.Delete End If Next obj End Sub
Delete ActiveX Checkboxes In Sheet
Scours an entire worksheet to locate and delete all ActiveX checkboxes. Useful for ensuring a clean sheet, especially before in-depth data analysis.
Sub DeleteActiveXCheckboxesInSheet(ws As Worksheet) Dim obj As Object For Each obj In ws.OLEObjects If obj.progID = "Forms.CheckBox.1" Then obj.Delete End If Next obj End Sub
Delete ActiveX Checkboxes In Workbook
Removes every ActiveX checkbox across the entire workbook. Ideal for starting afresh and ensuring consistency across larger projects or data sets.
Sub DeleteActiveXCheckboxesInWorkbook(wb As Workbook) Dim ws As Worksheet For Each ws In wb.Worksheets DeleteActiveXCheckboxesInSheet ws Next ws End Sub
More about Checkbox control
Here is the link more about how to add checkbox control on the Worksheet or UserForm in Excel.
Read More …
Here is the one more link to more about how to add checkbox control on the Worksheet or UserForm using VBA in Excel.
Read More …
you are a life saver lol
oh man… can’t thank you enough…. was trying to delete a checkbox since 1 hour as developer mode solution wasn’t working…’select object’ solution was a huge relief
Worked fine, thanks.
Wow – very clear, THANK YOU!
If you have a sheet with pictures and checkboxes, these instructions will delete both the checkboxes and photos. What if you want to keep the photos.
Hi, We have added a VBA code to remove only checkboxes and keep the photos and other objects as it is.
This worked well. Thanks so much. It was driving me insane trying to get rid of some damn check boxes on my excel sheet.
i was struggling with this for a while and only this post helped me solve my problem! thank you so much!!