Option Buttons

staceyg

New Member
Joined
Nov 16, 2005
Messages
2
Hi,
I'm trying to add an option button to a spreadsheet, like a survey form.

You can click in any of them to select them, but I cannot get it to select multiple buttons, only one at a time?

Anyone got any ideas how I can have multiple option buttons?

Thanks
 

Some videos you may like

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
You need to use Check Boxes instead, or use a pair of option buttons for each selection (so one is 'Yes' and one is 'No'). You may only select one option button from a group of option buttons.


Regards

Richard
 

staceyg

New Member
Joined
Nov 16, 2005
Messages
2
thanks for that.

Have just seen the GroupName property which I have changed and has now solved my problem.

Cheers
 

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
Option buttons have to be grouped.

Forms toolbar by putting them into a frame.

Controls toolbar by holding shift to select several and setting the Group property to the same thing.

Using numerous controls from the Controls toolbox in a worksheet is not recommended because there are bugs. More features, more bugs.
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832

ADVERTISEMENT

Code:
Using numerous controls from the Controls toolbox in a worksheet is not recommended because there are bugs. More features, more bugs.
Hi, Brian,
OK, this sounds possible. What's your experience ?
(Thusfar I must have had a lot of luck using them :) )

kind regards,
Erik
 

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
Hi Erik

REF. CONTROLS FROM CONTROLS TOOLBAR USED IN A WORKSHEET
You will be aware of the syndrome that when programming a larger application (and making mistakes) after a time Excel seems to "give up" - giving error messages in code that has been running correctly. I usually find that "cleaning" the code by copying to Notepad then back to a new module solves the problem. Sometimes re-making worksheets too.

We also learn to close Excel down occasionally during a heavy coding session, or even reboot. A symptom is that the shutdown takes 15 minutes instead of the usual 1 or 2.

A similar thing seems to happen to happen in this case. This can be more devastating because it tends to make it impossible to open a workbook - not only that, it can happen some time after the application is "finished". My experience with various forums suggests that this is quite common.

It may be that your "luck" is due to using relatively low numbers of controls, and/or having a later version of MS Office. We are still using Office 97 on NT4 here. With 15,000 PCs testing/upgrading seems to take forever.
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832

ADVERTISEMENT

Brain,
thank you for responding !

1. when you perform a cleanup action using NotePad, do you get a smaller file at the end ?

2. to my sense the followin actions would do the same as passing through notepad
  • open module
    copy entire contents to clipboard
    delete module
    create new module
    paste
don't you think so ?

kind regards,
Erik
 

BrianB

Well-known Member
Joined
Feb 17, 2003
Messages
8,127
1. no difference really
2. just to be on the safe side. The Notepad method ensures that no hidden formatting or other codes are transferred (which is where the problem lies)
 

erik.van.geit

MrExcel MVP
Joined
Feb 1, 2003
Messages
17,832
thanks,
would be a challenge to automate this process :)

copy code into notepadfiles
delete all code
make new modules
import textfiles as code

somebody must already have done something of the kind ...
 

Watch MrExcel Video

Forum statistics

Threads
1,118,086
Messages
5,570,136
Members
412,305
Latest member
Mozz
Top