1、首先在开发工具中打开VBA编辑器
2、在单元格区域当中输入一些内容作为例子
3、在VBA编辑器中插入模块
4、在模块当中输入如下代码,然后运行Sub 勾选复选框() Dim i i=3 For Each box In Worksheets(1).Shapes If box.Type=msoFormControl Then If box.FormControlType=xlCheckBox Then If Cells(i, 3) >=Cells(i, 2) Then box.ControlFormat.Value=True Else box.ControlFormat.Value=False End If End If End If i=i+1NextEnd Sub
5、用快捷键Alt+F8调出运行宏窗口,然后单击“执行”按钮,D列已按实际完成状况对复选框完成勾选,