I got this VBA Code which is supposed to read out the cells from closed excel files (which are located in one folder) and copy the content into the master file. It seems to read out the files as supposed however pasting the copied contend seems not to work.
Any ideas?
Sub ReadAndMerceData()
Dim objFs As Object
Dim objFolder As Object
Dim file As Object
Set objFs = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFs.GetFolder("C:\Users\XXX\Desktop\TEST")
Dim iStartRow As Integer
iStartRow = 0
For Each file In objFolder.Files
    Dim src As Workbook
    Set src = Workbooks.Open(file.Path)
    Dim iTotalRows As Integer
    iTotalRows = 50
    Dim iTotalCols As Integer
    iTotalCols = 17
    Dim iRows, iCols As Integer
    For iRows = 1 To iTotalRows
        For iCols = 1 To iTotalCols
            Cells(iRows + iStartRow, iCols) = src.Worksheets("Tabelle1").Cells(iRows, iCols)
        Next iCols
    Next iRows
    iStartRow = iRows + 1
    iRows = 0
    src.Close False
    Set src = Nothing
Next
End Sub
 
     
     
    