Public Sub ordena()
Dim i, j As Integer
Dim cant2 As Integer
Dim aux As Integer
cant2 = Val(txtcant.Text)
i = 1
j = 1
Do While i < ((cant2 - 1))
Do While j <= ((cant2 - i))
If num(i - 1) > num(j) Then
aux = num(i - 1)
num(i - 1) = num(j)
num(j) = aux
End If
j = j + 1
Loop
j = i
i = i + 1
Loop
End Sub