What I have at the moment:
Sub Merge()Dim bookList As Workbook
Dim mergeObj As Object, dirObj As Object, filesObj As Object, everyObj As Object
Application.ScreenUpdating = False
Set mergeObj = CreateObject("Scripting.FileSystemObject")
'change folder path of excel files here
Set dirObj = mergeObj.Getfolder("G:\loc\loc\loc\loc\loc\loc\loc")
Set filesObj = dirObj.Files
For Each everyObj In filesObj
Set bookList = Workbooks.Open(everyObj)
Range("A4:I" & Range("A65536").End(xlUp).Row).Copy
ThisWorkbook.Worksheets(1).Activate
Range("B65536").End(xlUp).Offset(0, 0).PasteSpecial
Application.CutCopyMode = False
bookList.Close
Next
End Sub
I want to change this so that it opens and copies from the files in date order (which is included in there filename)
eg it would open and copy from in an order like below:
"20150601 - Daily Update.xls"
"20150602 - Daily Update.xls"
"20150603 - Daily Update.xls"