How to Reset Excel Check Boxes with a Form Button
Question details
The user wants to clear multiple checkboxes in a spreadsheet simultaneously using a single reset button, while ensuring at least one specific required checkbox remains checked.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating a fillable form or digital checklist where users need a quick way to clear their previous selections without resetting default or required options.
- Observed behavior
- The user needs to automate the process using a form button and VBA macro to loop through and reset the checkbox values accurately.
Ensure that the Developer tab is enabled in your Excel ribbon, as you will need access to Form Controls and the VBA Editor. Remember to save your file as an Excel Macro-Enabled Workbook (.xlsm) to ensure your code is not lost.
Create a VBA Macro to Reset Checkboxes
Write a VBA script that loops through all form controls on the active sheet, clears the checkboxes, and then manually re-checks the required one.
By utilizing a simple VBA loop, you can quickly target all checkboxes on your worksheet. After turning them all off, you simply instruct the macro to turn a specific checkbox back on. This approach scales well regardless of how many checkboxes are on your sheet.
Navigate to the Developer tab on the ribbon and click 'Visual Basic', or press Alt + F11 on your keyboard to open the VBA Editor.
In the VBA Editor, click 'Insert' from the top menu and select 'Module' to create a blank script window.
Type a sub procedure that loops through checkboxes. For example: Sub ResetCheckBoxes() Dim cb As CheckBox For Each cb In ActiveSheet.CheckBoxes cb.Value = xlOff Next cb ActiveSheet.CheckBoxes("Check Box 1").Value = xlOn End Sub (Replace "Check Box 1" with the actual name of your required checkbox).
Close the VBA Editor. Go to the Developer tab, click 'Insert', and select the 'Button (Form Control)'. Click and drag on your spreadsheet to draw the button.
Right-click the newly created button, choose 'Assign Macro', select your 'ResetCheckBoxes' macro from the list, and click OK. Test the button to ensure it clears the boxes but leaves your target box checked.

Create and Manage Macros Easily with WPS Spreadsheet
WPS Spreadsheet offers comprehensive support for VBA macros and Form Controls, allowing you to easily build automated reset buttons for forms and checklists. With its intuitive Developer tools, you can seamlessly script, test, and execute checkbox automations.
- 1. Enable Developer Tools: Open your workbook in WPS Spreadsheet and navigate to the Developer tab to access all automation features.
- 2. Insert Form Controls: Click on 'Insert' within the Developer tab to add Checkboxes and a Command Button to your spreadsheet.
- 3. Write Your Script: Click 'Macros' or press Alt + F11 to open the integrated VBA editor and paste your reset loop script.
- 4. Assign and Save: Right-click your button to assign the macro, then save the document as an .xlsm macro-enabled workbook.

Frequently Asked Questions
Why isn't my reset button clearing the checkboxes?
This usually happens if macros are disabled by your spreadsheet's security settings. Check for a prompt at the top of the window asking to 'Enable Content'. Additionally, verify that you have properly assigned the macro to the button by right-clicking the button and checking 'Assign Macro'.
Can I reset ActiveX checkboxes instead of Form Control checkboxes?
Yes, but the VBA code differs. ActiveX controls are considered OLEObjects. You will need to loop through the OLEObjects on the sheet, check if their `progID` is 'Forms.CheckBox.1', and then set their `Object.Value` to False.
How do I keep multiple specific checkboxes selected during a reset?
In your VBA code, after the loop that clears all checkboxes, explicitly add multiple lines to set the value of those specific checkboxes to `True` (or `xlOn`). For example, add `ActiveSheet.CheckBoxes("Check Box 2").Value = xlOn` beneath the first one.
Do I absolutely have to use VBA to reset checkboxes?
Yes, native Excel and spreadsheet software require VBA to automatically reset form controls in bulk. Without a macro, you would have to uncheck each box manually.




