Click here to Skip to main content
15,886,091 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
If ComboBoxyear.Text = 1 Then
CheckBox1.Checked = True
ElseIf ComboBoxyear.Text = 2 Then
CheckBox1.Checked = True
ElseIf ComboBoxyear.Text = 3 Then
CheckBox1.Checked = True
ElseIf ComboBoxyear.Text = 4 Then
CheckBox1.Checked = True
Else
ComboBoxyear.Text = 5
CheckBox1.Checked = False
End If
Posted

1 solution

Your code need to be triggered by some event, say textchanged or click event (for combo box), see example[^].
If you just want to unchecked the checkbox1 when the textbox value is 5 then this will do:
If ComboBoxyear.Text = 5 Then
CheckBox1.Checked = False
Else
CheckBox1.Checked = True
End If
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900