It is best to start your own threads. You can always post a link to a thread that might be relevant.
When pasting code, please paste between code tags. Click the # icon to insert tags.
These days, most Microsoft Windows computers will have the framework files installed.
Sub ken()
Dim a() As Variant
a() = Array(5, 6, 1, 11)
MsgBox Join(a, vbLf)
a() = ArrayListSort(a)
MsgBox Join(a, vbLf)
a() = ArrayListSort(a, False)
MsgBox Join(a, vbLf)
End Sub
Function ArrayListSort(sn As Variant, Optional bAscending As Boolean = True)
With CreateObject("System.Collections.ArrayList")
Dim cl As Variant
For Each cl In sn
.Add cl
Next
.Sort 'Sort ascendending
If bAscending = False Then .Reverse 'Sort and then Reverse to sort descending
ArrayListSort = .toarray()
End With
End Function