Sorting a List Box Descending ie Latest to Top

Is there a simple way of sorting a list box  (DESC).
Ie I need to have the list box sort the latest to the top.
ie
20031212 asasasaas
20031111 m,m,mm,sm,

The option in the list box seems to only allow  sort assending???
Who is Participating?

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Commented:
Select your recordset in descending order and load the list box that way.
Author Commented:
I am loading a directory listing into the list box, ie i do not have a recordset, sorry i did not mention this.
Commented:
Ok, load the directory listing into an array, sort the array descending, then load the list box.
Commented:
Here is how to sort an array in descending order

Option Explicit

Private Sub Command1_Click()
Dim MyArray
MyArray = Array("A", "Z", "M")
Call SortDecending(MyArray)
Debug.Print MyArray(0); MyArray(1); MyArray(2)
End Sub

Private Function SortDecending(a)
Dim i, j As Long
Dim tmp
For i = 1 To UBound(a)
For j = 0 To UBound(a)
If LCase(a(i)) > LCase(a(j)) Then
temp = a(j)
a(j) = a(i)
a(i) = temp
End If
Next
Next
SortDecending = a
End Function

(thx to Erick37 for above)

Experts Exchange Solution brought to you by

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Author Commented:
I thought this may be the only way.!!

regards turnerrob
Author Commented:
Appreciate both the help comments offered.
Have split points, hope this is ok.

regards  turnerrob
Commented: