What is the problem of my code ... sometimes correct but sometimes not
Code:Dim type(2) Dim ctr As Integer For ctr = 0 To 2 type(ctr) = InputBox((ctr + 1) & " : " & " Enter 3 Numbers") Next 'First Input If type(0) > type(1) And type(2) Then lblH.Text = type(0) ElseIf type(0) < type(1) And type(2) Then lblL.Text = type(0) Else lblM.Text = type(0) End If 'Second Input If type(1) > type(0) And type(2) Then lblH.Text = type(0) ElseIf type(1) < type(0) And type(2) Then lblL.Text = type(1) Else lblM.Text = type(1) End If 'Third Input If type(2) > type(0) And type(1) Then lblH.Text = type(0) ElseIf type(2) < type(0) And type(1) Then lblL.Text = type(2) Else lblM.Text = type(2) End If




Reply With Quote