Private Sub cmdSort_Click ()
Dim I, J, K, arr(4) As Integer
For I = 0 To 4
arr(I) = CInt(txtarr(I).Text)
Next
For I = 0 To 3
For J = I To 4
If arr(I) < arr(J) Then
X = arr(I)
arr(I) = arr(J)
arr(J) = X
End If
Next
Next
For I = 0 To 4
txtoutput (I) .Text = CStr (arr (I))
Next
End Sub
Private Sub cmdSort__LostFocus()
For I = 0 To 4
txtarr(I).Text = Clear
Next
End Sub
No comments:
Post a Comment