Removing user created buttons

  • Thread starter Thread starter Savio
  • Start date Start date
S

Savio

i have a spreadsheet that contains a large number of user created
buttons (like the ones used in user forms). is there a way to select
all of them and delete them? there seems to be over 900 of them all
piled on top of each other which makes it difficult yo select them.
thanks
 
Do you want to delete all the objects?

Edit|goto (or F5 or ctrl-g)
Special|choose Objects|Ok
Hit the delete key on the keyboard
 
This macro will delete ALL Command-type buttons whether from the Forms
toolbar or the Control Toolbox toolbar...

Sub DeleteAllCommandTypeButtons()
Dim Button As OLEObject
With Worksheets("Sheet1")
.Buttons.Delete
For Each Button In .OLEObjects
If Button.progID Like "*CommandButton*" Then Button.Delete
Next
End With
End Sub
 
Back
Top