Forum Discussion
Edna_Crary
Jan 17, 2024Copper Contributor
Uncheck multiple checked boxes in Form Controls in Excel
I have a check list in Excel. I have added a check box in Form Controls in the Developer Tab. When I have gone through my list and checked the boxes, I need to refresh it for the next day, so that I can go through the list again, checking the boxes as I complete the step for each person. There are over 300 people in my list.
Does anyone know how I can quickly uncheck all the boxes so I have a fresh set of unchecked boxes for the next day?
1 Reply
Sort By
- NikolinoDEGold Contributor
You can try to use a simple VBA (Visual Basic for Applications) code to uncheck all the checkboxes in your worksheet. Follow these steps:
- Press ALT + F11 to open the Visual Basic for Applications (VBA) editor.
- In the editor, click on Insert in the menu and then choose Module. This will add a new module to your project.
- 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.