Hi!

I am super-beginner in the macro world. We have a macro that reads certain columns and rows in all sheets of different excel files, and then writes them in a new excel file. My problem is that it even considers the hidden sheets and I don't know why. This creates me problems to organize information in pivot tables. Could you help me?

I = 1
For Each objFile In objFolder.Files
Workbooks.Open (objFile)

For csht = 1 To ActiveWorkbook.Sheets.Count 'worksheet or sheets
With ActiveSheet
lastRow = .Cells(.Rows.Count, "A").End(xlUp).Row
End With
For teller = 11 To lastRow
'print no of worksheets
Cells(I + 1, 3) = ActiveWorkbook.Worksheets.Count
'print sheetname
Cells(I + 1, 4) = Sheets(csht).Name
Range(Cells(I + 1, 5), Cells(I + 1, 25)) = Sheets(Sheets(csht).Name).Range("A" & teller & ":Z" & teller).Value
I = I + 1
Next teller
Next csht



Thank you!