This code will put 500 random number in order
Dim arrShort(500)
For i = 0 To 500
Randomize
arrShort(i) = Int(Rnd * 100)
Next
'This will order them
For i = 0 To UBound(arrShort) - 1
For j = 0 To i
If arrShort(j) > arrShort(j + 1) Then
temp = arrShort(j + 1)
arrShort(j + 1) = arrShort(j)
arrShort(j) = temp
End If
Next
Next
Main Topics
Browse All Topics





by: GeoffKellPosted on 2001-02-25 at 02:19:42ID: 5875985
Here area a couple of links from my Favourites related to sorting.
faq/main/s orting.htm
t_old/vb/q uicksort.h tm
http://www.mvps.org/vbnet/
http://www.wiseley.com/mat
Regards
GK