12-11-2009, 01:01 AM
How do I make it that only one of it can be checked at a time? So if they check any others, it automatically unchecks the previous one that was checked.
Thanks.
(12-11-2009, 01:01 AM)HmanDude Wrote: [ -> ]
How do I make it that only one of it can be checked at a time? So if they check any others, it automatically unchecks the previous one that was checked.
Thanks.
If RadioButton1.Checked = True Then
RadioButton2.Checked = False
RadioButton3.Checked = False
ElseIf RadioButton2.Checked = True Then
RadioButton1.Checked = False
RadioButton3.Checked = False
ElseIf RadioButton3.Checked = True Then
RadioButton1.Checked = False
RadioButton2.Checked = False
End If
(12-11-2009, 09:10 AM)dunlop03 Wrote: [ -> ]Just use this :
Just use this (radiobuttons) :
Code:If RadioButton1.Checked = True Then
RadioButton2.Checked = False
RadioButton3.Checked = False
ElseIf RadioButton2.Checked = True Then
RadioButton1.Checked = False
RadioButton3.Checked = False
ElseIf RadioButton3.Checked = True Then
RadioButton1.Checked = False
RadioButton2.Checked = False
End If
Private Sub CheckBox1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.Click
If CheckBox1.Checked = True Then
CheckBox2.Checked = False
CheckBox3.Checked = False
End If
End Sub
Private Sub CheckBox2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox2.Click
If CheckBox2.Checked = True Then
CheckBox1.Checked = False
CheckBox3.Checked = False
End If
End Sub
Private Sub CheckBox3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox3.Click
If CheckBox3.Checked = True Then
CheckBox1.Checked = False
CheckBox2.Checked = False
End If
End Sub
If RadioButton1.Checked = True Then
RadioButton2.Checked = False
RadioButton3.Checked = False
ElseIf RadioButton2.Checked = True Then
RadioButton1.Checked = False
RadioButton3.Checked = False
ElseIf RadioButton3.Checked = True Then
RadioButton1.Checked = False
RadioButton2.Checked = False
End If