You can loop through the pivot tables on the worksheet:
Dim pt As PivotTable
For Each pt In ActiveSheet.PivotTables
pt.PivotCache.Refresh
Next pt
BJ wrote:
I would like to refresh all pivot tables within a specific worksheet. I am
trying to use the 'RefreshAll' function but I'm getting a 'Run-time error
'438' - Object doesn't support this property or method' error message.
I am using the statement
ActiveSheet.RefreshAll
Is this not a possible combination? I've tried changing it to
'ActiveWorksheet' with the same result. If I use 'ActiveWorkbook' it works,
but I only want to update a specific sheet.
thanks.
BJ
--
Debra Dalgleish
Contextures
www.contextures.com/tiptech.html
Blog:
http://blog.contextures.com