You can create an array, load the data from your text boxes into the array,
then sort the array. There are a number of algorithms for sorting an
array - just search for VB sort array. Here's one sample, along with the
web site I took it from. This code will pop up some input boxes. The first
asks how many elements are in your array, then you'll see an input box for
each element. The function will sort them in descending order.
http://www.a1vbcode.com/snippet-4110.asp
Private Sub SortArrayDescending()
Dim A(20) As Integer
Dim num, i, j, k, arr, temp As Integer
Dim strOutput As String
num = InputBox("Intialize the size of your array:")
For i = 0 To num - 1
A(i) = InputBox("Enter your array: ")
Next i
'this will sort your array in descending order
For i = 0 To num - 1
For j = i + 1 To num - 1
If A(i) < A(j) Then
temp = A(i)
A(i) = A(j)
A(j) = temp
End If
Next j
Next i
For i = 0 To num - 1
strOutput = strOutput & A(i) & ";"
Next i
MsgBox strOutput
End Sub