erasing checkboxes

  • Thread starter Thread starter marksuza
  • Start date Start date
M

marksuza

Hi, I dont have much background in programming so I need a little hel
with a piece of code a put together to erase checkboxes in a specifi
range.

Sub Erase3()

Dim myCBX As CheckBox

For Each myCBX In Range("A10:A15")
myCBX.Delete
Next
End Sub

It gives me type mismatch. What does it mean? And can anybody help me
Thank
 
Dim myCBX As CheckBox

For Each myCBX In ActiveSheet.Checkboxes
if not Intersect(myCBX.TopLeftCell, _
Range("A10:A15")) is nothing then
myCBX.Delete
End if
Next
End Sub

Assumes textboxes are from the forms toolbar.
 
Back
Top