ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Reading files in alphabetic order (https://www.excelbanter.com/excel-programming/397313-reading-files-alphabetic-order.html)

Sören_Marodören[_3_]

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



All times are GMT +1. The time now is 01:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com