Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Assuming that the optionbuttons are from the forms toolbar, if you select
them all and link them to a cell (right-click, Format ControlControl, cell link), then that cell will contain an index number that you can use in code or in worksheet functions. -- HTH RP (remove nothere from the email address if mailing direct) "Leith Ross" wrote in message ... Hello Rmagic, The easiest way is to first find the OptionButton that was selected using a loop. This code will place the OptionButton number in cell "A1". You can change the cell to what you need as well as the max loop value of 31. This code assumes all the OptionButton numbers are sequential. Code: -------------------- Dim OB As Object For I = 1 To 31 Set OB = Controls("OptionButton" & I) If OB.Value = True Then Range("A1").Value = I Exit Loop End If Next I -------------------- Sincerely, Leith Ross -- Leith Ross ------------------------------------------------------------------------ Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465 View this thread: http://www.excelforum.com/showthread...hreadid=484513 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Option Buttons/Radio Buttons | New Users to Excel | |||
Option Buttons | Excel Discussion (Misc queries) | |||
Navigating between option buttons is not selecting the option | Excel Programming | |||
Navigating between option buttons is not selecting the option | Excel Programming | |||
Option Buttons | Excel Programming |