Private Sub Command1Click()
Dim num(0 To 5) As Integer
Dim i As Integer, j As Integer
Dim t As Integer
num(0) = 4: num(1) = 7: num(2) = 2: num(3) = 0: num(4) = 3: num(5) = 9
i = 0: j = 1: t = 0
For i = 1 To 5 Step 1
For j = i + 1 To 4 Step 1
If num(i) > num(j) Then
t = num(i)
num(i) = num(j)
num(j) = t
End If
Next j
Next i
For i = 1 To 5
List1.AddItem num(i)
Next i
End Sub