
You can repeat for the number of sheets.
VBA Code
As an example, There is an Excel file with the following three sheets:
sample01
sample02
sample03

Option Explicit
Sub sample()
Dim ws As Worksheet
For Each ws In ThisWorkbook.Worksheets
'output to "immediate window"
Debug.Print ws.Name
Next
End Sub
Result
You repeated for the number of sheets!

FYI
For more information about following, see the following official online manual:
●Worksheets Object
●Worksheet Object