Forum Discussion

NikolinoDE's avatar
NikolinoDE
Platinum Contributor
Jan 17, 2024

Re: Uncheck multiple checked boxes in Form Controls in Excel

Edna_Crary 

You can try to use a simple VBA (Visual Basic for Applications) code to uncheck all the checkboxes in your worksheet. Follow these steps:

  1. Press ALT + F11 to open the Visual Basic for Applications (VBA) editor.
  2. In the editor, click on Insert in the menu and then choose Module. This will add a new module to your project.
  3. Copy and paste the following VBA code into the module:

Vba Code is untested, please backup your file.

Sub UncheckAllCheckBoxes()
    Dim chkBox As CheckBox

    For Each chkBox In ActiveSheet.CheckBoxes
        chkBox.Value = xlOff
    Next chkBox
End Sub

4. Close the VBA editor by clicking the X button or pressing ALT + Q.

5. Now, you can run the macro to uncheck all checkboxes. You can do this by pressing ALT + F8, selecting UncheckAllCheckBoxes, and clicking Run. The steps and text was revised with the AI.

This code loops through all the checkboxes in the active sheet and sets their values to xlOff, which corresponds to an unchecked state.

Please make sure to save your workbook before running any VBA code. Also, ensure that you have the Developer tab visible in Excel (you can enable it in Excel options if it's not visible).

After running the macro, all checkboxes in the active sheet should be unchecked. 

 

My answers are voluntary and without guarantee!

 

Hope this will help you.

 

Was the answer useful? Mark as best response and like it!

This will help all forum participants.

 

No RepliesBe the first to reply

Resources