Reading files in alphabetic order

  • Thread starter Sören_Marodören
  • Start date
S

Sören_Marodören

I use the following lines to multi select files in a directory.
:
:
Filt = "Text Files (*.txt),*.txt," & _
"Comma Separated Files (*.csv),*.csv," & _
"ASCII Files (*.asc),*.asc," & _
"All Files (*.*),*.*"
FilterIndex = 1
Title = "Select files:"
AllFileNamn = Application.GetOpenFilename _
(FileFilter:=Filt, _
FilterIndex:=FilterIndex, _
Title:=Title, _
MultiSelect:=True)
:
:

When I use the AllFileName to read in the files to Excel, the files are not
in alphabetic order. And they are not in order of when I selected them. I
don't know what order they are.

Can some one tell me why it works in this way and how I can get it in
alphabetic order (or maybe other useful orders)?

Best regards,
/Sören Nilsson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top