Atoykan hocamızın kodunu alttaki gibi düzenledim.
Sub GetData()
Dim sFile As Workbook, tFile As Workbook
Dim dosya As String
Set tFile = ThisWorkbook
Application.ScreenUpdating = False
dosya = Dir(ThisWorkbook.Path & Application.PathSeparator & "*.*")
With tFile.Worksheets("Senelik Mazeret")
.Range("A2:E" & Rows.Count).ClearContents
Do While dosya <> ""
If dosya <> ThisWorkbook.Name Then
Set sFile = Workbooks.Open(ThisWorkbook.Path & Application.PathSeparator & dosya)
sFile.Worksheets("Sayfa1").Range("A1").CurrentRegion.Offset(1).Copy
.Activate
.Cells(Rows.Count, 1).End(3).Offset(1, 0).Select
.Paste
Application.CutCopyMode = False
sFile.Close
End If
dosya = Dir
Loop
Set sFile = Nothing
Set tFile = Nothing
Application.ScreenUpdating = True
ThisWorkbook.Activate
.Activate
.Range("A1").Select
End With
MsgBox "Bitti"
End Sub
Gerçi mantık hatası var ayarlayınca eklerim.
Sayfa1 yazmışsınız ondan kafalar karıştı.