Dim I as long
Dim J as long
Dim K as long
Dim L as long
Dim M as long
Dim array(10) as long
K = Ubound(array)
' Minimizes swaps
For I = Lbound(array) to K - 1
M = array(I)
For J = I + 1 To K 'Find the least of I and the rest
If M > array(J) then
array(I) = array(J)
array(J) = M
M = array(I)
end if
Next
Next