Select Multiple Radio Buttons Independently

Donal28

Well-known Member
Joined
Apr 23, 2010
Messages
527
Hi All

I have a User form with 70 categories that each have radio button options of 0,1,2. I am finding that the form will only allow me to select 1 radio button at time where I need to select 70 different options of 0,1,2 individually. I have tried grouping the options for each set of 3 radio buttons and called the groups diffferent names but still find that it only allows me to select 1 radio button on the form.


any help on this would be very much appreciated

Regards

Donal
 
Donal

The reason the code is putting the data into the column (L) to the right of the column it should go in (K) is because the Offset is telling it to.

Where should the data go?

As for the wrong data being put in, I think that's something to do with your logic.

I've looked at it a couple of times and it doesn't quite make sense - the first 2 Ifs check the same thing for the same value.

What is 'One' anyway?

This sort of thing is one of the reasons I suggested listboxes.:)
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.
Thanks for the heads up I actually got it working from what you said about the Offset. I have the 1st 3 working and will continue with the rest from the code below. I have ungrouped all the radio buttons and there will be a shed load of if statement so its a bit unconventional alright!!

Private Sub EnterDetails_Click()
ActiveWorkbook.Sheets("B1 Exam 29000").Activate
Range("K1").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
If OptionButton4 = True Then
ActiveCell.Offset(0, 0).Value = "0"
ElseIf OptionButton2 = True Then
ActiveCell.Offset(0, 0).Value = "1"
Else
ActiveCell.Offset(0, 0).Value = "2"
End If
If OptionButton7 = True Then
ActiveCell.Offset(0, 1).Value = "0"
ElseIf OptionButton6 = True Then
ActiveCell.Offset(0, 1).Value = "1"
Else
ActiveCell.Offset(0, 1).Value = "2"
End If
If OptionButton8 = True Then
ActiveCell.Offset(0, 2).Value = "0"
ElseIf OptionButton9 = True Then
ActiveCell.Offset(0, 2).Value = "1"
Else
ActiveCell.Offset(0, 2).Value = "2"
End If

End Sub
 
Upvote 0
The "One" I was referring to in the last post was what I called the 1st grouping of radion buttons but i found it wasn't distingusining between 0,1 and 2 in the group and only giving me back 2 no matter what I chose
 
Upvote 0
If you mean 'One' was the group name for a set of buttons then you can't use it like that - it's only a property of each button.

I think the only way it might be of use when getting the value selected would be some sort of loop/array type thing.

eg loop through all option buttons, identify which group they 'belong' to, and either store the caption for the selected option or TRUE/FALSE for each
 
Upvote 0

Forum statistics

Threads
1,224,525
Messages
6,179,319
Members
452,905
Latest member
deadwings

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top