This sub updates all the pivot tables in the active workbook.
Sub UpdatePivotTables()
' Updates all the pivot tables in the ActiveWorkbook.
Application.ScreenUpdating = False
For Each pc In ActiveWorkbook.PivotCaches
pc.Refresh
Next
Application.ScreenUpdating = True
End Sub
Subscribe to:
Post Comments (Atom)
2 comments:
hi, will this work for pivots ina SHARED workbook?
I use office 2003 and have discovered that i can't update the pivots now my workbook is shared.
i will try this.
thanks
ok i tried it and NO, you cannot use vba to update teh pivots ina shared workbook.
i went for teh other option and just created my reports in a seperate workbook that pull the data from teh shared workbook.
Post a Comment