Yet another helper for marking PAT’s! I was modifying one of the Excel marking rubrics and to test that I had linked up all the calculations correctly with their checkboxes, I checked all of them. When it came to unchecking them all so that I could duplicate the workbook and start marking — well, you know — I thought: “There must be a better way!”…
Insert the following VBA in a Module in your Excel workbook and it will be available to run as a Macro:
Option Explicit Sub ClearCheckBoxes() Dim wSheet As Worksheet Dim chkBox As Excel.CheckBox Application.ScreenUpdating = False For Each wSheet In ThisWorkbook.Worksheets For Each chkBox In wSheet.CheckBoxes chkBox.Value = xlOff Next chkBox Next Application.ScreenUpdating = True End Sub
References:
- https://www.extendoffice.com/documents/excel/4302-excel-uncheck-all-checkboxes.html
- https://stackoverflow.com/questions/16818207/uncheck-all-checkboxes-across-entire-workbook-via-commandbutton