VBA aktualisiertung Pivottabelle
16.10.2014 15:11:10
Katharina
Die Werte werden jedoch nicht aktualisiert und ich bekomme als die Meldung, dass der Code falsch wäre, weiß jemand woran das liegen könnte?
Sub ChangePivotCache()
Dim pt As PivotTable
Dim wks As Worksheet
Dim i As Integer
For Each wks In ActiveWorkbook.Worksheets
For Each pt In wks.PivotTables
pt.CacheIndex = Sheets(1).PivotTables(1).CacheIndex
Next pt
Next wks
End Sub
LG