Efetue o looping através de um Range:
Sub LoopThroughSheetsGetValue()Dim ws As Worksheet
Worksheets("Total").Range("A2:B100").ClearContentsFor Each ws In ActiveWorkbook.WorksheetsIf ws.Name <> ("Total") ThenIf ws.Visible = True ThenLet Range("A65536").End(xlUp).Offset(1, 0) = ws.NameLet Range("A65536").End(xlUp).Offset(0, 1) = _Format(ws.Range("D8"), "h:mm;@") 'Tota da HorasEnd IfEnd IfNext wsEnd Sub
Tags: Excel, VBA, Loop, Sheets, get, range, value,
