This code refreshes all the PivotTables in the active workbook.
VBA Code:
Sub RefreshAllPivotTables()
Dim pt As PivotTable
For Each pt In ActiveWorkbook.PivotTables
pt.RefreshTable
Next pt
End Sub
This code refreshes all the PivotTables in the active workbook.
VBA Code:
Sub RefreshAllPivotTables()
Dim pt As PivotTable
For Each pt In ActiveWorkbook.PivotTables
pt.RefreshTable
Next pt
End Sub