我正在尝试清除特定单元格范围或按列中的所有活动 X 复选框
看起来这很简单,因为我可以使用下面的代码为整个工作表做到这一点。我只是不确定如何修改它以仅适用于单列或单元格范围。
Sub ClearAllCheckboxes()
Dim Answer As String
Dim MyNote As String
Dim Obj As Object
MyNote = "This will Clear all CheckBoxes Proceed? "
Answer = MsgBox(MyNote, vbQuestion + vbYesNo, "???")
If Answer = vbNo Then
Exit Sub
Else
On Error Resume Next
For Each Obj In ActiveSheet.OLEObjects
Obj.Object.Value = False
Next Obj
End If
End Sub