how to loop through option buttons

B

Blahdee

first, let me say i am working with 2003 excel.
so i have this column of data. i want to have a column of option buttons
right next to the column of data so that you can easily choose which piece of
data to work with the various other macros i have written. the problem is, i
need support for ALOT of these option buttons... say 300? I dont want to
write 300 _change() subroutines. is there a way to loop through all the
option buttons and find the one thats enabled? I would also want to grab the
cell immediately to the left of the option button.
the excel help files dont have much info on option/radio buttons :)
 
S

Simon Lloyd

Are the buttons of the forms or controls toolbox?, how many buttons
would be enabled at any one time? do you want to be able to run the
macro of the enabled button? wouldn't selecting an action from a
dropdown list be better than 300 buttons?

Blahdee;573212 said:
first, let me say i am working with 2003 excel.
so i have this column of data. i want to have a column of option
buttons
right next to the column of data so that you can easily choose which
piece of
data to work with the various other macros i have written. the problem
is, i
need support for ALOT of these option buttons... say 300? I dont want
to
write 300 _change() subroutines. is there a way to loop through all the
option buttons and find the one thats enabled? I would also want to
grab the
cell immediately to the left of the option button.
the excel help files dont have much info on option/radio buttons :)


--
Simon Lloyd

Regards,
Simon Lloyd
'Microsoft Office Help' (http://www.thecodecage.com)
 
D

Dave Peterson

I would assign a linked cell to each of the optionbuttons and then loop through
those linked cells.

Are you sure you're using optionbuttons from the control toolbox toolbar (the
circular radio buttons)? If yes, then does this mean that you assigned a
groupname to each group of these optionbuttons?

Or is it possible you meant checkboxes (a single yes/no choice)?

And are you sure you used the controls from the control toolbox toolbar.

=======

If you had multiple options to choose from and wanted to use optionbuttons from
the Forms toolbar, you could look at Debra Dalgleish's site:
http://contextures.com/xlForm01.html
 

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