Does Dir() make any guarantee on the order of files returned?
There's no guarantee that Dir()
will return the files in any particular order. The MS Access VBA documentation even says:
Tip Because file names are retrieved in no particular order, you may want to store returned file names in an
array
, and then sort the array.