ActiveX Option Buttons

G

Guest

When using activeX control's option buttons in a grouping (from the control
toolbox - not the forms toolbox), how and where do you store the results of
which option button they chose?

Thanks,

Diane
 
D

Dave Peterson

You're using the .GroupName property to group those optionbuttons, right?

You can also use the .linkedcell property (different for each checkbox--not just
different for each group), then use a formula to return which one was selected.

I put 3 optionbuttons from the control toolbox toolbar on a worksheet. I
assigned all three the same .groupname (Group1). And I linked the first to A1,
the second to A2 and the last to A3.

=if(a1=true,"First",if(a2=True,"Second","Third"))
or
=if(a1,"First",If(a2,"Second","Third"))

===
Or
=match(true,a1:a3,0)
to return a number.

==============
Yep, they behave differently from the optionbuttons from the Forms toolbar.
 
T

Tom Ogilvy

use the control source property to link them to separate cells

or (you rarely do both)

Use the click event (or other event) of each control to take the appropriate
action.

or in other code, check the controls to see whether they are selected or
not.
 

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