Hi
I have a normal table(a) which gets data using getpivotdata
From other 4 pivot table
I made a new pivot from the normal table(a).
I am using below VBA code to refresh all pivot tables.
When I run this code once the pivot does not gets updated and have to run the code twice.
I think that the code is first refreshing table(a) pivot and then its refreshing other 4 pivots.
In short I have a pivot table which is based on other pivot table.
Please help
I have a normal table(a) which gets data using getpivotdata
From other 4 pivot table
I made a new pivot from the normal table(a).
I am using below VBA code to refresh all pivot tables.
Code:
Private Sub refreshdata_Click()
Dim PC As PivotCache
For Each PC In ActiveWorkbook.PivotCaches
PC.refresh
Next PC
End Sub
When I run this code once the pivot does not gets updated and have to run the code twice.
I think that the code is first refreshing table(a) pivot and then its refreshing other 4 pivots.
In short I have a pivot table which is based on other pivot table.
Please help