Kód: Vybrat vše
Private Sub Worksheet_Change(ByVal Target As Range)
Application.EnableEvents = False
Sheets("List2").PivotTables("Kontingenční tabulka 2").PivotCache.Refresh
Application.EnableEvents = True
End Sub
Pokud pod listem2 , tak takto:
Kód: Vybrat vše
Private Sub Worksheet_Activate()
Application.EnableEvents = False
ActiveSheet.PivotTables("Kontingenční tabulka 2").PivotCache.Refresh
Application.EnableEvents = True
End Sub
Ale možností je i více jak to zapsat.