prueba con esto... es para hacerlo ascendentemente ,para la otra forma le cambias le signo > por < y ya
Código PHP:
Private Sub Command1_Click()
Dim k As Integer
Dim vector(1 To 5)
vector(1) = Text1.Text
vector(2) = CInt(Text2.Text)
vector(3) = CInt(Text3.Text)
vector(4) = CInt(Text4.Text)
vector(5) = CInt(Text5.Text)
n = 5
For k = 1 To n
For j = k To n - 1
If vector(k) > vector(j + 1) Then
temp = vector(k)
vector(k) = vector(j + 1)
vector(j + 1) = temp
End If
Next j
Next
For x = 1 To 5
List1.AddItem (vector(x))
Next x
End Sub
saludos