Hi,
Here's the general approach I use.
Sub Open_All_Files()
Dim oWbk As Workbook, wb as Workbook
Dim sFil As String
Dim sPath As String
Set wb = Thisworkbook
sPath = "C:\your path\" 'location of files
ChDir sPath
sFil = Dir("*.xlsx") 'change or add formats
Do While sFil <> "" 'will start LOOP until all files in folder sPath have been looped through
Set oWbk = Workbooks.Open(sPath & "\" & sFil) 'opens the file
' do something
oWbk.Close True 'close the workbook, saving changes
sFil = Dir
Loop ' End of LOOP
End Sub
The do something would be something like
Sheet1.Range("A1:E100").Copy
wb.Activate
Sheet1.Range("A" & Rows.Count).End(xlup).Cells(2,1).PasteSPecial(xlPasteValues)
Bookmarks