Private Sub Command1_Click()
Randomize
Dim a(500) As Integer
For i = 1 To 500
a(i) = Int(100 * Rnd)
Print Format(a(i), "@@@");
If i Mod 25 = 0 Then Print
Next i
For i = 1 To 499
k = i
For j = i + 1 To 500
If a(j) < a(k) Then k = j
Next j
t = a(i): a(i) = a(k): a(k) = t
Print Format(a(i), "@@@");
If i Mod 25 = 0 Then Print
Next i
Print a(500)
End Sub