bonjour,

Je n'arrive pas a lier les filtres de 2 tableaux dynamiques. Je voudrais, lorsque je choisis dans le filtre de mon premier tableau, que ce filtre devienne aussi le filtre du second tableau.
Voici le code que j'ai commence a utiliser pour faire cette manip:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
 
Sub liaisonTableauIndic()
 
Dim monPivIt As Object, Mavariable As Long, i As Long
 
Application.ScreenUpdating = False
With ActiveSheet.PivotTables("PivotTableIndic").PivotFields("Code Article")
 
For Each monPivIt In .PivotItems
monPivIt.Visible = True
Next
On Error Resume Next
Application.ScreenUpdating = False
For Each monPivIt In .PivotItems
If monPivIt.Visible = True Then monPivIt.Name = Mavariable
Next
End With
 
With ActiveSheet.PivotTables("PivotTableRatio").PivotFields("Code Article")
If i = Mavariable Then monPivIt.Name = True Else monPivIt.Name = False
 
Application.ScreenUpdating = True
End With
End Sub
Merci d'avance pour votre aide.