G
Guest
I know what that message means, but I sure can't figure out why I'm getting
it in this program. I have five GroupBoxes on Form1 each containing 3 to 5
radio buttons. The following code works fine for the first three groupboxes,
then gives me the error on the fourth. I must be missing SOMETHING, but I
sure don't see it.
*** Code****
Public Sub clearForm()
Dim rad As RadioButton
Dim grp As New GroupBox
Try
For Each grp In Me.Controls
For Each rad In grp.Controls
rad.Checked = False
Next
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
*** End Code ***
This is VB.Net 2003 Professional
it in this program. I have five GroupBoxes on Form1 each containing 3 to 5
radio buttons. The following code works fine for the first three groupboxes,
then gives me the error on the fourth. I must be missing SOMETHING, but I
sure don't see it.
*** Code****
Public Sub clearForm()
Dim rad As RadioButton
Dim grp As New GroupBox
Try
For Each grp In Me.Controls
For Each rad In grp.Controls
rad.Checked = False
Next
Next
Catch ex As Exception
MsgBox(ex.Message)
End Try
End Sub
*** End Code ***
This is VB.Net 2003 Professional