VBA & Macro Problems

Uncheck All Form Control Checkboxes in Excel with VBA

Khadija KhanKhadija Khan Nov 12, 2026 870 views

Question details

The user needs to quickly clear hundreds of Form Control checkboxes on the active Excel worksheet.

Uncheck All Form Control Checkboxes in Excel with VBA
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains many selected Form Control checkboxes that need to be reset at once.
Observed behavior
The user wants all Form Control checkboxes on the active sheet to display as unchecked.
Before you start

Confirm that the objects are Form Control checkboxes rather than ActiveX controls, because they use different VBA collections. Save the workbook as a macro-enabled .xlsm file before adding or running the macro.

Solution 1Recommended

Run a VBA macro to uncheck every Form Control checkbox on the active sheet

Use this method when you need to reset all Form Control checkboxes on the worksheet currently open in Excel.

The macro loops through the ActiveSheet.CheckBoxes collection and assigns xlOff to every checkbox. It affects only Form Control checkboxes on the active worksheet.

1
Open the Visual Basic Editor

In Excel, press Alt+F11 to open the Visual Basic Editor.

2
Insert a standard module

In the Visual Basic Editor, select Insert > Module to create a standard code module.

3
Paste the checkbox reset macro

Paste this code into the module: Sub UncheckAllCheckBoxes() Dim chkBox As CheckBox: For Each chkBox In ActiveSheet.CheckBoxes: chkBox.Value = xlOff: Next chkBox: End Sub.

4
Run the macro

Return to Excel, activate the worksheet whose checkboxes you want to clear, press Alt+F8, select UncheckAllCheckBoxes, and click Run.

Run a VBA macro to uncheck every Form Control checkbox on the active sheet
All Form Control checkboxes are reset: After the macro runs, every Form Control checkbox on the active worksheet is set to unchecked.
WPS Spreadsheets VBA tools

Reset worksheet checkboxes with VBA in WPS Spreadsheets

WPS Spreadsheets provides a familiar spreadsheet workspace for opening macro-enabled workbooks and using VBA tools to automate repetitive checkbox-reset tasks. Open your .xlsm file, access the macro editor, add the reset code, and run it on the target sheet.

  1. 1. Open the macro-enabled workbook: In WPS Spreadsheets, select Menu > Open and choose the Excel .xlsm workbook that contains the checkboxes.
  2. 2. Activate the target worksheet: Select the worksheet tab that contains the Form Control checkboxes you want to reset.
  3. 3. Open the VBA tools: Go to Developer > Visual Basic, then choose Insert > Module in the VBA editor.
  4. 4. Add the reset procedure: Paste the checkbox loop procedure that sets each checkbox value to xlOff, then save the workbook as an .xlsm file.
  5. 5. Run the macro: Open the Macros dialog from the Developer tab, select the checkbox-reset procedure, and choose Run.
Automate clearing many worksheet checkboxes instead of changing them one by one.Open and work with Microsoft Excel .xlsx and macro-enabled .xlsm workbook formats.Use a familiar spreadsheet interface for formulas, controls, and worksheet editing.Keep checkbox-reset automation in the same workbook workflow.
microsoft office alternative - wps office

Frequently Asked Questions

Will this VBA macro uncheck boxes on every worksheet in the workbook?

No. The ActiveSheet.CheckBoxes collection targets only the worksheet currently active when you run the macro. To process all sheets, the code must loop through the workbook's Worksheets collection.

Why does the macro not change my Excel checkboxes?

The controls may be ActiveX checkboxes instead of Form Control checkboxes. Form Controls are available through ActiveSheet.CheckBoxes, while ActiveX controls must be accessed through ActiveSheet.OLEObjects.

How do I identify whether a checkbox is Form Control or ActiveX?

On the Developer tab, enable Design Mode and right-click the checkbox. An ActiveX checkbox typically shows Properties and View Code options; a Form Control checkbox shows Format Control.

Do I need to save the workbook as .xlsm?

Yes. Choose File > Save As and select Excel Macro-Enabled Workbook (*.xlsm) if you want to keep the VBA code. Saving as .xlsx removes macros.

Can I run the macro from the Excel Macros dialog?

Yes. After adding the code to a standard module, press Alt+F8, select UncheckAllCheckBoxes, and click Run while the correct worksheet is active.