• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Auto refreshing a pivot table based on another pivot table

kekko

New Member
Hi all,
I've a pivot table (A), which is based on another pivot table (B). So, it's a pivot table of a pivot table.
I need the pivot table A to be refreshed everytime I made a change into the pivot table B applying some filters.
I tried with the following macros, but nothing changes:

1)
>>> use code - tags <<<
Code:
Sub Refresh_All_Pivot_Table_Caches()
Dim pc As PivotCache
For Each pc In ThisWorkbook.PivotCaches
pc.Refresh
Next pc
End Sub
2)
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Worksheets("prova").PivotTables("PivotTable1").PivotCache.Refresh
End Sub
I think that the problem is that excel is not really executing those macros (while others in the same worksheet yes): infact I put a stop/breakpoint to check the execution of those macros and nothing cames up when I changed filters on pivot table B.

I saw the trust center of excel, and I've the "disable all macros with notifications" option enabled, which seems to be not the problem.

What could be the problem? Is there anyone that could help me with this?

Thanks,
Francesco
 
Last edited by a moderator:
Back
Top