Looking for Refresh Pivot table Macro


Posted by Ken on November 13, 2001 11:29 AM

I am looking for a macro to refresh all pivottables in a workbook, I see the button for refreshing pivottables manually, I also see the option to refresh pivottables on workbook open.

Thanks
Ken



Posted by Juan Pablo on November 13, 2001 12:38 PM

I haven't tested this, but give it a try
Sub RefereshAll()
Dim Sh as Worksheet
Dim Pt as PivotTable

For each Sh in Sheets
For each Pt in Sh
Pt.Refresh
Next Pt
Next Sh

End Sub

Juan Pablo