View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
RitaJ RitaJ is offline
external usenet poster
 
Posts: 3
Default Visual Basic code

The code stopped in line "For Each btn in Buttons"
RJ


"Jim Thomlinson" wrote:

This code assumes you got your buttons from the Forms Toolbar...

Sub RemoveButtons()
Dim btn As Button

For Each btn In Buttons
btn.Delete
Next btn
End Sub
--
HTH...

Jim Thomlinson


"RitaJ" wrote:

I have somehow got thousnads of option buttons in my Excel worksheet. I would
like to write a simple code that would remove them using a macro instead of
manually deleting them. The option buttons are not in continuos numbers so
the code needs to check if the button exists first and then delete.

I am a novice and cannot write the above code.

Thanks