R
Rich
Hi
I have two radio buttons in a groupbox on a Windows form and have wrote the
code below to find out which button is selected. Can anyone tell me if
there is an easier / better way to code this as it seems a bit long?
Thanks
Rich
Dim rbarray As RadioButton()
Dim strValue As String
rbarray = new RadioButton() {rb1, rb2}
Dim i As Integer
For i = 0 To 1
If rbarray(i).Checked Then
strValue = rbarray(i).Text
End If
Next
I have two radio buttons in a groupbox on a Windows form and have wrote the
code below to find out which button is selected. Can anyone tell me if
there is an easier / better way to code this as it seems a bit long?
Thanks
Rich
Dim rbarray As RadioButton()
Dim strValue As String
rbarray = new RadioButton() {rb1, rb2}
Dim i As Integer
For i = 0 To 1
If rbarray(i).Checked Then
strValue = rbarray(i).Text
End If
Next