You can loop through all worksheets in a workbook using this:
Option Explicit
Sub LoopThroughWorksheets()
'declare a worksheet to loop through the workbook with
Dim SheetIdx As Worksheet
For Each SheetIdx In ThisWorkbook.Worksheets
'
'do stuff here
'
'for example, if you wanted to show the name of each sheet
'in the workbook, you could add the following line:
MsgBox (SheetIdx.Name)
Next SheetIdx
End Sub