Pivot Table Refresh


Posted by Mark Farr on August 22, 2001 7:45 AM

I need to programatically refresh the data in a pivot table and have not been able to figure out how to do it. Does someone out there know!?



Posted by Lenze on August 22, 2001 7:51 AM

I use the following code in the Worksheet Tab.

Private Sub Worksheet_Activate()
ActiveSheet.PivotTable("PivotTable1").RefreshTable
End Sub

This refreshes the PivotTable whenever the Worksheet is activated