I use the following to fill a list box with the names of files in a folder
How can I sort the list box so the files are shown by the date created, in descending order?
Thanks in advance
Code:
Private Sub GetFileList()
Dim LoadFiles As String
Dim strFill As String
Dim FileFolder As String
FileFolder = "C:\Temp\20132014\Orders"
LoadFiles = Dir$(FileFolder & "\*.pdf")
Do While LoadFiles > ""
strFill = strFill & LoadFiles & ";"
LoadFiles = Dir$
Loop
Me.lstWebOrders.RowSource = strFill
End Sub
How can I sort the list box so the files are shown by the date created, in descending order?
Thanks in advance