pcsparky
07-14-2010, 11:03 AM
I'm using the Dir function in a Do While loop to obtain the file names of all files in a given folder. ie. sFil = Dir("*.xlsm")
This works perfectly.
However, Excel appears to choose what order to read those files. Even though the files in each folder begin with numbers eg. 01, 02, 03 etc. some folders are read sequentially whilst others are not. This is consistent so there obviously is some order according to Excel.
Does anyone know what attributes Excel is looking at to decide what order to read the files?
Is there any way to set the order?
This works perfectly.
However, Excel appears to choose what order to read those files. Even though the files in each folder begin with numbers eg. 01, 02, 03 etc. some folders are read sequentially whilst others are not. This is consistent so there obviously is some order according to Excel.
Does anyone know what attributes Excel is looking at to decide what order to read the files?
Is there any way to set the order?