Home > Macros > Basics > Check Box Worksheet Check Box - To Do ListAdd check boxes in an Excel worksheet, for items in a To Do list. Next, connect them to a worksheet cell, to keep track of the completed items. NOTE: For a quicker way to add check boxes, use the macro from the Excel VBA - Check Boxes page |
In this example, there is To Do list on an Excel worksheet. Each row in the To Do list contains one task.
This tutorial shows how to add a check box in each row, to mark the task as completed.
To insert a check box, follow these steps:
The check box has default text when it is created, so follow these steps to remove it.
Now that you've created and formatted one check box, you can copy it, and paste copies into the other cells.
Follow these steps to create the additional check boxes
The next step is to link each check box to a worksheet cell, so you can capture the check box result
If there are only a few check boxes, you can link them manually, by following the steps below. If there are many check boxes to link, it's quicker to use a macro, like the one in the next section.
Follow these steps to link a check box to a worksheet cell:
NOTE: You can also link to a cell by going into the check box's properties, but that takes longer.
Instead of manually linking the remaining check boxes, we’ll use the following macro, named LinkCheckBoxes.
To add this code to your own workbook, copy it to a regular code module.
Sub LinkCheckBoxes() Dim chk As CheckBox Dim lCol As Long lCol = 2 'number of columns to right for link For Each chk In ActiveSheet.CheckBoxes With chk .LinkedCell = _ .TopLeftCell.Offset(0, lCol).Address End With Next chk End Sub
Next, follow these steps to run the check box linking macro:
NOTE: You won’t see anything happen on the worksheet, but each check box will be linked to the cell two columns to its right.
To test the check boxes, click on each one.
To see the completed workbook, get the Excel Check Box To Do List sample file.
NOTE: The workbook also has macros that add the date in column E, when you add a check mark. And if you clear the check mark, the date is also cleared.
Delete or Add Worksheet Objects
Order Form with Billing Check Box
Last updated: May 10, 2023 3:36 PM