ActiveSheet.Paste gives '1004' error, then I try to debug it. But there is no error while debugging. How does it occur? Is there a solution, recommodation? Note: All variables are defined as global.
For Each dosya In CreateObject("Scripting.FileSystemObject").GetFolder(fileDirec).Files
Set yeni = CreateObject("Excel.Application")
yeni.Workbooks.Open fileDirec& dosya.Name
Set s1 = yeni.Workbooks(dosya.Name).Sheets(1)
s1.Range("a2:s" & s1.[a65536].End(3).Row).Copy
sat = Range("a65536").End(3).Row
Cells(sat + 1, "a").Select
ActiveSheet.Paste
yeni.CutCopyMode = False
yeni.Quit
Set yeni = Nothing
Next