Hi,
I want to actualice all PT with an Makro. All PT are indipendent from each other and is also on different worksheets. Following programm do I have but it isn't working and I don't know why:
Another sugestion was to activate the different worksheets but it is also not working:
Thank you for your help.
I want to actualice all PT with an Makro. All PT are indipendent from each other and is also on different worksheets. Following programm do I have but it isn't working and I don't know why:
Code:
Dim pvt As PivotTable, j As Integer
For j = 1 To ActiveSheet.PivotTables.Count
Set pvt = ActiveSheet.PivotTables(j)
ActiveSheet.PivotTables(j).PivotCache.Refresh
Next
Another sugestion was to activate the different worksheets but it is also not working:
Code:
Dim wks As Worksheet, pvt As PivotTable, i As Integer, j As Integer
For i = 1 To ActiveWorkbook.Worksheets.Count
Set wks = ActiveWorkbook.Worksheets(i)
For j = 1 To ActiveSheet.PivotTables.Count
'Set pvt = ActiveSheet.PivotTables(j)
ActiveSheet.PivotTables(j).PivotCache.Refresh
Next
Next
Thank you for your help.
Last edited by a moderator: