PDA

View Full Version : Option Buttons



ukdane
04-22-2009, 04:29 PM
So I'm having problems with some option buttons that I have created on a worksheet, using the forms control.

I've grouped 4 option buttons together (by highlighting them all, right clicking and choosing group).

When I move the group to a certain area on the worksheet (which an ex-employee created) the last button instead of returning 4, acts like it is nr 1, and returns 1, and checks/unchecks itself when button 1 is clicked/reclicked.

Also I seem to be totally unable to create a new set of buttons.

Why is this happening?

Also is there anyway to edit the format of a group box, so that you can't see the name or line of it (could this be the cause om my problem above)

Cheers

mikerickson
04-22-2009, 06:27 PM
Instead of Right clicking>Group, use the group box on the Forms menu to group option buttons.

CreganTur
04-23-2009, 05:52 AM
Instead of Right clicking>Group, use the group box on the Forms menu to group option buttons.

^ This.

Group boxes make the entire process of grouping objects much easier. It also provides a visual cue to your users that 'these items are related to each other.'

It cuts down on user confusion for them to see multiple sets of option buttons within their own boxes, as opposed to just having them arranged on the UserForm.

ukdane
04-24-2009, 02:34 PM
Can I hide / recolour the group box, as I don't want it to be visible, it doesn't fit with the style of the worksheet.
I'm not actually using a Userform, the option boxes are placed directly on the worksheet.

Edit: Should I be using the control toolbox instead?

mikerickson
04-24-2009, 04:28 PM
You could make the Group Box invisible with this
ActiveSheet.Shapes("Group Box 1").Visible = msoFalse

ukdane
04-27-2009, 11:29 PM
mikerickson: Super thanks, THAT was an answer I could use!

:friends:

ukdane
04-27-2009, 11:56 PM
I've created a group box which contains 4 option buttons.
they all work correctly, assigning a number to a field.
However when I move the box to its correct position on the worksheet, two of the buttons start to work as one button- they mirror each other instead of working indepentently.
If I move the group box away from this postion again, they work as they should. I can't see anything that is causing this error.
Does anyone have any ideas as to why this is happening?
Thanks

mikerickson
04-28-2009, 06:21 AM
Just hypothisising, but if you have linked all of your option buttons to the same cell, then the group box can be moved so that one of the previously enclosed buttons is outside the group. This button will form its own option-group, but since its linked to the same cell as the buttons in the other group, it will mirror the actions of some of those buttons.

Options buttons need to be completely inside their group box. Set it at design time and leaving it alone would be the safest way to position option buttons. Moving them about risks putting one or more of them outside the box.