Probably not the best way, but at least, the following is quite straightforward:
Code:Public Sub SortAscIntCol(ByRef Col As Collection) Dim i As Long, j As Long, k As Integer For i = 2& To Col.Count k = Col(i) For j = i - 1& To 1& Step -1& If k >= Col(j) Then Col.Remove i Col.Add k, After:=j GoTo 1 '<-- For efficiency reasons End If Next j Col.Remove i Col.Add k, Before:=1& 1 Next i End Sub




Reply With Quote