I have a little problem that nearly drives me xx! I've five Checkboxes and when I check the fifth I want the others to be unchecked and number five stay checked.
In runtime I got stuck with owerflow when it lies in "CheckBox5_CheckedChanged" Method and in other it wont just work guess it pretty simple right?
Code:Private Sub CheckBox5_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CheckBox5.Click Dim Check As Control If CheckBox5.Checked = True Then CheckBox5.Checked = False Exit Sub Else For Each Check In Me.GroupBox1.Controls If TypeOf Check Is CheckBox Then CType(Check, CheckBox).Checked = False End If Next CheckBox5.Checked = True End If End Sub




Reply With Quote