Code:
Sub GetAllClocks()
Application.ScreenUpdating = False
Sheets("DataLog").Select
Columns("A:H").Select
Selection.ClearContents
Dim wb As Workbook, ws As Worksheet
Set fso = CreateObject("Scripting.FileSystemObject")
Set fldr = fso.GetFolder("N:\x\08 Rapportages\Uren\Data")
y = ThisWorkbook.Sheets("DataLog").Cells(Rows.Count, 1).End(xlUp).Row + 1
For Each wbFile In fldr.Files
If fso.GetExtensionName(wbFile.Name) = "xlsm" Then
Set wb = Workbooks.Open(wbFile.Path)
-For Each ws In wb.Sheets
Code:
wsLR = ws.Cells(Rows.Count, 1).End(xlUp).Row
For x = 2 To wsLR
ThisWorkbook.Sheets("DataLog").Cells(y, 1) = CDate(ws.Cells(x, 1))
ThisWorkbook.Sheets("DataLog").Cells(y, 2) = ws.Cells(x, 2)
ThisWorkbook.Sheets("DataLog").Cells(y, 3) = ws.Cells(x, 3)
ThisWorkbook.Sheets("DataLog").Cells(y, 4) = ws.Cells(x, 4)
ThisWorkbook.Sheets("DataLog").Cells(y, 5) = CDate(ws.Cells(x, 5))
ThisWorkbook.Sheets("DataLog").Cells(y, 6) = CDate(ws.Cells(x, 6))
ThisWorkbook.Sheets("DataLog").Cells(y, 7) = ws.Cells(x, 7)
ThisWorkbook.Sheets("DataLog").Cells(y, 8) = ws.Cells(x, 8)
ThisWorkbook.Sheets("DataLog").Cells(y, 9) = ws.Cells(x, 9)
ThisWorkbook.Sheets("DataLog").Cells(y, 10) = ws.Cells(x, 10)
y = y + 1
Next x
Next ws
wb.Close
End If
Next wbFile
End Sub