Deleting Check Boxes

J

John

I have a series of 52 check boxes in 52 Rows, I now want to delete all of
them. I've tried deleting the column, but the check boxes don't actually
disappear. How do I delete them all without having to go into each one and
deleting them. I've tried Edit-Go To-Special-Objects, but I've other Check
boxes in the same sheet which I don't want to delete.

Also how can I uncheck all 52 check boxes (that have ticks in them) in one
procedure


Thanks
 
N

Norman Jones

Hi John,

If by 'procedure' you mean VBA, then to untick the check boxes, try:

'=============>>
Sub UntickCheckboxes()
Dim CBox As CheckBox
Const col As Long = 1 '<<==== (Column A) CHANGE

For Each CBox In ActiveSheet.CheckBoxes
If CBox.TopLeftCell.Column = col Then
CBox.Value = xlOff
End If
Next

End Sub
'<<=============

To delete the checkboxes, try:

'=============>>
Sub DeleteCheckboxes()
Dim CBox As CheckBox
Const col As Long = 1 '<<==== (Column A) CHANGE

For Each CBox In ActiveSheet.CheckBoxes
If CBox.TopLeftCell.Column = col Then
CBox.Delete
End If
Next

End Sub
'<<=============

In each case, change the column number from 1 (=A) to the required column
number.
 
J

John

Thanks Norman, works like a dream

Is there any way other than VBA to actually delete the check boxes (assuming
I have check boxes in other columns on the same sheet that I don't want to
delete)

Thanks
 
D

Dave Peterson

Show the drawing toolbar
click on that arrow icon (Tooltip of Select Objects)
Lasso the checkboxes that you want to remove

or...

Click on the first and ctrl-click on subsequent checkboxes. Then hit the delete
key.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top