Ciao
nel modulo del foglio2:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim ws As Worksheet
Dim pt As PivotTable
Const strField As String = "ZONA"
Application.EnableEvents = False
Application.ScreenUpdating = False
on error resume next
If Target.Address = "$F$16" Then
For Each ws In ThisWorkbook.Worksheets
For Each pt In ws.PivotTables
With pt.PageFields(strField)
.ClearAllFilters
.CurrentPage = Target.Value
End With
Next pt
Next ws
End If
Application.EnableEvents = True
Application.ScreenUpdating = True
End Sub
Saluti
Edit: aggiunta istruzione on error resume next
NOTA: il codice (che avevo nei miei archivi) agisce su tutti i fogli alla ricerca di tabelle pivot, quindi andrebbe limitato al foglio2, togliendo il ciclo for each ws...
Ideale è mirarlo quella specifica tabella.
[Modificato da dodo47 16/05/2017 19:39]
Domenico
Win 10 - Excel 2016