Controlling numerical values of option buttons in a group?

J

Jay Weiss

Hi,

I have an Excel application with a number of option buttons arranged
in groups within group boxes. Now, I know that option buttons take on
numerical values when arranged as an option group. My question is,
how do you control the numerical values they take?

Here's why I ask: I've added additional option buttons to each option
group, and they are behaving erratically. In some cases, they have
lost the entry to the "linked cell" field. In others, they have the
same numerical value as other option buttons in the same group and
show as "true" when another button in the same group is selected. In
yet others, they behave just fine, communicated a unique value to the
linked cell.

I really don't want to have to switch to combo boxes because the
visual information provided by the selected option buttons
communicates something important within the application. However, I'm
tired of fighting with the option buttons. Can anyone help me tame
them?

Thanks...

....Jay
 
D

Dave Peterson

The only time I've notice a problem with the linked cell not working is when the
optionbutton isn't completely within the groupbox.

And it's always looked like it was a simple first come, first served with what
optionbutton gets what number.

It didn't matter where they were located--it only mattered when I added them to
the groupbox.

I've also found that lots of times I can delete the old optionbuttons (and
groupboxes) and re-add them via code.

If you want to look at that possibility, you may want to review the code on
Debra Dalgleish's site:
http://contextures.com/xlForm01.html
 
J

Jay Weiss

Hi Dave,

Thanks. To be honest with you, I think all of the option buttons were
within their group boxes, but I took the easy (if laborious) route out
and just copied over group boxes and option buttons that worked
correctly. All is well now--or well enough, anyway.

Thanks for your help. That link is a good one.

....Jay
 

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