Keeping with the control array you can shortan your code to this
hope this helpsCode:Private Sub Comand1_Click() Dim i As Integer Dim Retval as Integer Retval = 1 For i = 2 To 5 If Cint(Text(i).Text) > CInt(Text(Retval).Text) Then Retval = i Next i MsgBox "TextBox " & Retval & " Is The Highest." End Sub




Reply With Quote