View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sören_Marodören[_3_] Sören_Marodören[_3_] is offline
external usenet poster
 
Posts: 1
Default Reading files in alphabetic order

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