Public Function sort As Variant aCount As Variant As Variant For To aC

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
Public Function sort(a() As Variant, aCount As Variant) As Variant()
For i = 0 To aCount - 2
For q = 0 To aCount - 2
If a(q) > a(q + 1) Then
Dim stroka As Variant
stroka = a(q)
a(q) = a(q + 1)
a(q + 1) = stroka
End If
Next
Next
sort = a
End Function