scorpio1179
12-10-2004, 08:20 AM
Hi everyone!
I am trying to loop through the panels and get the text of the radiobutton within the panel.
I did the following and it worked but it is very redundant.
I would do the following but I have to do it 11 times.
thanks so much!!
Heidi.
Dim radio As RadioButton
Dim pan As Panel
Dim hh(11) As String
For Each radio In Panel1.Controls
If radio.Checked Then
hh(0) = radio.Text
End If
Next
For Each radio In Panel2.Controls
If radio.Checked Then
hh(1) = radio.Text
End If
Next
For Each radio In Panel3.Controls
If radio.Checked Then
hh(2) = radio.Text
End If
Next
For Each radio In Panel4.Controls
If radio.Checked Then
hh(3) = radio.Text
End If
Next
For Each radio In Panel5.Controls
If radio.Checked Then
hh(4) = radio.Text
End If
Next
For Each radio In Panel6.Controls
If radio.Checked Then
hh(5) = radio.Text
End If
Next
For Each radio In Panel7.Controls
If radio.Checked Then
hh(6) = radio.Text
End If
Next
I am trying to loop through the panels and get the text of the radiobutton within the panel.
I did the following and it worked but it is very redundant.
I would do the following but I have to do it 11 times.
thanks so much!!
Heidi.
Dim radio As RadioButton
Dim pan As Panel
Dim hh(11) As String
For Each radio In Panel1.Controls
If radio.Checked Then
hh(0) = radio.Text
End If
Next
For Each radio In Panel2.Controls
If radio.Checked Then
hh(1) = radio.Text
End If
Next
For Each radio In Panel3.Controls
If radio.Checked Then
hh(2) = radio.Text
End If
Next
For Each radio In Panel4.Controls
If radio.Checked Then
hh(3) = radio.Text
End If
Next
For Each radio In Panel5.Controls
If radio.Checked Then
hh(4) = radio.Text
End If
Next
For Each radio In Panel6.Controls
If radio.Checked Then
hh(5) = radio.Text
End If
Next
For Each radio In Panel7.Controls
If radio.Checked Then
hh(6) = radio.Text
End If
Next