I have 15 groups of 3 optionbuttons that need to have previously selected values included. They all have similar names and it seems like I should be able to use a looping macro to call up each value, but I'm not allowed to use the form of:
buttonname = cell value + loop
formname.buttonname.value = true/false
Is it possible to do what I want to do, or am I stuck manually naming each button and giving it a value?
For i = 1 To 15
v1 = sheets("admin").Cells(80 + i, 3).Value + "NI"
v2 = sheets("admin").Cells(80 + i, 3).Value + "I"
v3 = sheets("admin").Cells(80 + i, 3).Value + "E"
If Cells(80 + i, 2) = "Excluded" Then
Options.v1.Value = False
Options.v2.Value = False
Options.v3.Value = True
ElseIf Cells(80 + i, 2) = "Included" Then
Options.v1.Value = False
Options.v2.Value = True
Options.v3.Value = False
Else
Options.v1.Value = True
Options.v2.Value = False
Options.v3.Value = False
End If
Next
Bookmarks