I just tested the below code and it works fine. Either your path is incorrect or the sheet name you are trying to get data from is incorrect. One last possibility is that you have saved the file which you run the macro from in the same folder as the 27 workbooks.
Is "RW645" the folder name or the workbook name?
For Each fl In .getfolder("C:\Users\Craig\Documents\RW645").Files
If it is the workbook name you need to change it to this.
For Each fl In .getfolder("C:\Users\Craig\Documents").Files
Sub dave()
Dim cel As Range, wb, iRow
Dim fl, sh As Worksheet
Dim rng As Range
Application.ScreenUpdating = 0
iRow = 3
Set wb = Workbooks.Add(1)
With CreateObject("scripting.filesystemobject")
For Each fl In .getfolder("C:\Users\Craig\Documents").Files ' you have to enter your path the the folder
If Left(.getextensionname(fl), 2) = "xl" Then
With Workbooks.Open(fl)
With Sheets("Quote Template") 'change the sheet name if needed.
wb.Sheets(1).Cells(iRow, 1).Value = .Cells(19, 5).Value
wb.Sheets(1).Cells(iRow, 2).Value = .Cells(10, 12).Value
wb.Sheets(1).Cells(iRow, 3).Value = .Cells(9, 12).Value
wb.Sheets(1).Cells(iRow, 5).Value = .Cells(17, 12).Value
wb.Sheets(1).Cells(iRow, 6).Value = .Cells(15, 12).Value + .Cells(16, 12).Value
iRow = iRow + 1
End With
.Close True
End With
End If
Next
End With
Application.ScreenUpdating = 1
End Sub
Bookmarks