label10 displays which is the highest number
label12 displays which is the lowest number
label14 displays which is the number that is duplicated
pls help my codes don't run 100% correct.:'(
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Label6.Text = Val(TextBox1.Text)
Label7.Text = Val(TextBox2.Text)
Label8.Text = Val(TextBox3.Text)
If Val(TextBox1.Text) > Val(TextBox2.Text) Then
Label10.Text = TextBox1.Text
Label12.Text = TextBox2.Text
ElseIf Val(TextBox2.Text) > Val(TextBox1.Text) Then
Label10.Text = TextBox2.Text
Label12.Text = TextBox1.Text
ElseIf Val(TextBox3.Text) > Val(TextBox1.Text) Then
Label10.Text = TextBox3.Text
Label12.Text = TextBox1.Text
ElseIf Val(TextBox1.Text) > Val(TextBox3.Text) Then
Label10.Text = TextBox1.Text
Label12.Text = TextBox3.Text
ElseIf Val(TextBox3.Text) > Val(TextBox2.Text) Then
Label10.Text = TextBox3.Text
Label12.Text = TextBox2.Text
ElseIf Val(TextBox2.Text) > Val(TextBox3.Text) Then
Label10.Text = TextBox2.Text
Label12.Text = TextBox3.Text
ElseIf Val(TextBox1.Text) > Val(TextBox2.Text) Or Val(TextBox3.Text) Then
Label10.Text = TextBox1.Text
ElseIf Val(TextBox2.Text) > Val(TextBox1.Text) Or Val(TextBox3.Text) Then
Label10.Text = TextBox2.Text
ElseIf Val(TextBox3.Text) > Val(TextBox2.Text) Or Val(TextBox1.Text) Then
Label10.Text = TextBox3.Text
ElseIf Val(TextBox1.Text) < Val(TextBox2.Text) Or Val(TextBox3.Text) Then
Label12.Text = TextBox1.Text
ElseIf Val(TextBox2.Text) < Val(TextBox1.Text) Or Val(TextBox3.Text) Then
Label12.Text = TextBox2.Text
ElseIf Val(TextBox3.Text) < Val(TextBox2.Text) Or Val(TextBox1.Text) Then
Label12.Text = TextBox3.Text
Else
Label10.Text = ""
Label12.Text = ""
End If
If Val(TextBox1.Text) = Val(TextBox3.Text) = Val(TextBox2.Text) Then
Label14.Text = TextBox1.Text
ElseIf Val(TextBox1.Text) = Val(TextBox2.Text) Then
Label14.Text = TextBox1.Text
ElseIf Val(TextBox2.Text) = Val(TextBox3.Text) Then
Label14.Text = TextBox2.Text
ElseIf Val(TextBox3.Text) = Val(TextBox1.Text) Then
Label14.Text = TextBox3.Text
Else
Label14.Text = ""
End If
End Sub