Hey there ferrier, couldn't you just shorten that whole piece of code down to just 3 statements? I've done it here (without using Val, you can add it if you want and such):
If TextBox1.Text = TextBox3.Text And TextBox2.Text = TextBox4.Text Or TextBox1.Text = TextBox4.Text And TextBox2.Text = TextBox3.Text Then
Label6.Text = "Students share 2 subjects"
ElseIf TextBox1.Text = TextBox3.Text And TextBox2.Text <> TextBox4.Text Or TextBox1.Text = TextBox4.Text And TextBox2.Text <> TextBox3.Text Or TextBox2.Text = TextBox4.Text And TextBox1.Text <> TextBox3.Text Or TextBox2.Text = TextBox3.Text And TextBox1.Text <> TextBox4.Text Then
Label6.Text = "Students share 1 subject"
Else
Label6.Text = "Students share 0 subjects"
End If
I think it works with every option if it doesn't then I'd have to sit down and work through it some more. Aye the middle elseif is just one huge statement lol.
Hope it works.
mhmm, looks like the VB.net highlighting syntax is incomplete