Option Explicit Sub RefreshAllPivots() Dim ws As Worksheet Dim pt As PivotTable On Error Resume Next For Each ws In ActiveWorkbook.Worksheets For Each pt In ws.PivotTables pt.RefreshTable Next Next End Sub
Option Explicit Sub RefreshAllPivots() Dim ws As Worksheet Dim pt As PivotTable On Error Resume Next For Each ws In ActiveWorkbook.Worksheets For Each pt In ws.PivotTables pt.RefreshTable Next Next End Sub