I am trying to paste data from different workbooks into 1 master workbook. So far the copy and pasting of data is working, but, when i paste the data into the workbook, there are rows being skipped after each workbook is being pasted into the master workbook. The picture below shows the problem.
2,3 and 6-12 are being skipped. Below is my code:
Sub Macro1()
'
' Macro1 Macro
'
Dim wb1 As Workbook
Set wb1 = ThisWorkbook
Path = "C:\Users\Tester\Documents\test\"
Filename = Dir(Path & "*.xls")
Do While Filename <> ""
Workbooks.Open Filename:=Path & Filename, ReadOnly:=True
For Each Sheet In ActiveWorkbook.Sheets
Sheet.Rows("2:" & Range("A1").End(xlDown).Row).copy _
wb1.Sheets(1).Range("A" & Range("A1").End(xlDown).Row + 1)
Application.CutCopyMode = False
Next Sheet
Workbooks(Filename).Close
Filename = Dir()
Loop
End Sub
I think the problem has something to do with this line "wb1.Sheets(1).Range("A" & Range("A1").End(xlDown).Row + 1)" but i am not sure how to fix this. Any suggestions? Thank you!