Excel Equivalent of Access OptionBox

L

LarryP

Access offers an "optionbox" control where each radio button has an
associated numeric value that can be used by a VBA SELECT statement. The
closest I've found in Excel forms design (where I'm far less knowledgeable
than I am in Access) is a grouping of radio buttons, but as far as I can
figure out, selecting one of them returns a "True" for that one and a "False"
for all the others. Can anyone point me to either a native Excel equivalent
of the Access optionbox, or a template somewhere that I can plagiarize to do
what I need?
 
R

Randy

I have been working on that very problem for a couple of days now and haven't
found a reasonable answer. However if I find out I will let you know. You can
also watch my discussions from today about Toggle Buttons and Check Boxes.
Maybe one or both of us will get the answer.
 
L

LarryP

While I was waiting for enlightenment, I've been playing around with a
listbox with the option property turned on, so there's a radio button next to
each possible selection. Set up a named range in a hidden worksheet that has
1, 2, 3, ... in the first column and Choice1, Choice2, etc. (whatever text
you want to see in the listbox) in column 2. Then use that as the RowSource
for the listbox, with 2 columns, column 1 as the bound column and the column
widths set to 0 and whatever-it-takes. The OnClick event for the listbox
then gives you the appropriate integer value, which you can use to feed a
Select Case statement in your code. I'm still very much in the testing mode,
but it looks to me like that's going to do it for me.

Gee, maybe I answered my own question!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top