- Code: Select all
Private Sub LoopSheets()
Dim Ws As Worksheet
With ThisWorkbook
For Each Ws In .Worksheets
If Ws.Name <> ActiveSheet.Name Then
Debug.Print Ws.Name
' Place your code here to either
' extra data or deposit them
End If
Next Ws
End With
End Sub
Because the ActiveSheet is singled out this procedure can be at the center of a project to write data from a master to subsidiary sheets or from subsidiary sheets to a master.