I am using VBA, and looping through spreadsheets in a specific folder - opening the spreadsheets, coping some lines then pasting it into a master spreadsheet. I made use of the following link to achieve the loop:
Loop through files in a folder using VBA?
My problem/question: the spreadsheets have the date saved as the file name - for example:
Trader Estimate T+1 Consol_20131003.xlsx
But it seems using the Dir function, that the spreadsheets are not being opened in the chronological order as dictated by the date in the filename.
How would I achieve this opening in chronological order (according to the filename)?
Don't know if this makes a difference but the spreadsheets are not saved on this computer in chronological order - ie. if I order the folder of spreadsheets by date modified, they are not in perfect order as dictated by the date in their filename.
Any help is very much appreciated