ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   ActiveX Option Buttons (https://www.excelbanter.com/excel-programming/382512-activex-option-buttons.html)

dread

ActiveX Option Buttons
 
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

merjet

ActiveX Option Buttons
 
http://groups.google.com/group/micro...4f60c134f6cd47

Hth,
Merjet


Dave Peterson

ActiveX Option Buttons
 
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.

dread wrote:

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


--

Dave Peterson

Tom Ogilvy

ActiveX Option Buttons
 
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.

--
Regards,
Tom Ogilvy

"dread" wrote in message
...
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





All times are GMT +1. The time now is 11:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com