[Help]ElseIf, EndIf. If[Closed]
I need help for the code highlighted in red.
So if a "combbox7.text = combbox8.text"
then
"combbox7.text = red and combbox8.text = red"
but
when they are different meaning when combbox7.text does not equal combbox8.text
return to original colour `black`
so combbox7.text = black
and combbox8.text = black.
but that doesnt work. the code to turn the text back to black.
Heres the code:
So if a "combbox7.text = combbox8.text"
then
"combbox7.text = red and combbox8.text = red"
but
when they are different meaning when combbox7.text does not equal combbox8.text
return to original colour `black`
so combbox7.text = black
and combbox8.text = black.
but that doesnt work. the code to turn the text back to black.
Heres the code:
Code:
If ComboBox7.Text = ComboBox8.Text Or ComboBox7.Text = ComboBox9.Text Or ComboBox8.Text = ComboBox9.Text Then
MessageBox.Show("You have two or more of the same perk.", "Error!", MessageBoxButtons.OK, MessageBoxIcon******rmation)
If ComboBox7.Text = ComboBox8.Text Then
ComboBox7.ForeColor = Color.Red
ComboBox8.ForeColor = Color.Red
ElseIf ComboBox7.Text = ComboBox9.Text Then
ComboBox7.ForeColor = Color.Red
ComboBox9.ForeColor = Color.Red
ElseIf ComboBox8.Text = ComboBox9.Text Then
ComboBox8.ForeColor = Color.Red
ComboBox9.ForeColor = Color.Red
Else
ComboBox7.ForeColor = Color.Black
ComboBox8.ForeColor = Color.Black
ComboBox9.ForeColor = Color.Black
End If
ElseIf ComboBox1.Text = ComboBox3.Text Or ComboBox1.Text = ComboBox6.Text Or ComboBox3.Text = ComboBox6.Text Then
MessageBox.Show("You have two or more of the same weapon.", "Error!", MessageBoxButtons.OK, MessageBoxIcon******rmation)
End If


