Что-то вроде этого более изящно, и, вероятно, поможет вам лучше изучить подобные концепции.
Sub LoopThroughAllTablesinWorkbook()
'PURPOSE: Loop through and apply a change to all Tables in the Excel Workbook
'SOURCE: www.TheSpreadsheetGuru.com/the-code-vault
Dim tbl As ListObject
Dim sht As Worksheet
'Loop through each sheet and table in the workbook
For Each sht In ThisWorkbook.Worksheets
For Each tbl In sht.ListObjects
'Do something to all the tables...
tbl.ShowTotals = True
Next tbl
Next sht
End Sub
'Или ...
Sub tableAllSheet()
Dim sh As Worksheet
Dim tbl As ListObject
'Loop through all sheets
For Each sh In ThisWorkbook.Worksheets
'Loop through all table on a sheet
For Each tbl In sh.ListObjects
'Print table name, table header row address and data range address to Immediate window
Debug.Print tbl.Name & vbTab & tbl.HeaderRowRange.Address & vbTab & tbl.DataBodyRange.Address
Next tbl
Next sh
End Sub