Thread: Option Button
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Option Button

From the Forms toolbar.

If you want to get rid of all them, you can try this:

activesheet.checkboxes.delete

Sometimes, this will blow up--when there's lots of those checkboxes.

But you could run a macro that deletes them one at a time.

Option Explicit
Sub testme()
Dim CBX As CheckBox
For Each CBX In ActiveSheet.CheckBoxes
CBX.Delete
Next CBX
End Sub

If you're new to macros, you may want to read David McRitchie's intro at:
http://www.mvps.org/dmcritchie/excel/getstarted.htm

HELP wrote:

Could you please tell me or anyone else for that matter how i can delete
about 300 or more check boxes made from forms without clicking on every
single individual one to delete. Thank you. I did it all individually and
then it crashed and i have spent a few hours on it as there are 5 pages to
the document which has about heaps of boxes. I need to get this in to work
tomorrow and im DESPERATE to find an easier way.

"Dave Peterson" wrote:

You can hide the groupbox in code. Or with just a one liner:

Hit alt-f11 to get to the VBE
hit ctrl-g to see the immediate window
type this and hit enter.

activesheet.groupboxes.visible = false

If you only want to hide a single groupbox, you can use something like:

activesheet.groupboxes("group box 1").visible = false



HELP wrote:

Thank you so much for your help. Could you please tell me how i can delete
the border around the group box, i need it deleted on the usable worksheet as
well as for printing.

"Dave Peterson" wrote:

If you have multiple optionbuttons and clicking on one of them turns off the
others, you can add a groupbox (also on that Forms toolbar) around each group.

If you used a linked cell, make sure you don't clear it.

If this doesn't help, you'll need to add some details about when the choice goes
away.

HELP wrote:

How do i get the dot to stay in the option button i have created from the
forms tool bar?

--

Dave Peterson


--

Dave Peterson


--

Dave Peterson