Hello again...
I have multiple frames, each with 9 option buttons. I have my userform coded such that only the relevant frames are highlighted via red coloring to signal the user which frames need input...
I am trying to code it that whenever any of the 9 button within the frame is selected the coloring changes for that frame only... do i need to create a sub routine for each option buttons' click event, or is there a way i can loop an IF statement for all them ?
This will be the same exact code "if s1_opt(*).value = true" for all 9 . Is this doable ?
Private Sub s1_opt1_Click()
If s1_opt1.Value = True Then
For i = 1 To 9
With Me.Controls("Label" & i)
.BackColor = RGB(0, 255, 0)
End With
With Me.Controls("s1_opt" & i)
.BackColor = RGB(0, 255, 0)
End With
Next i
Frame_student1.BackColor = RGB(0, 255, 0)
Frame_student1.BorderColor = RGB(0, 255, 0)
End If
End Sub
Bookmarks