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 |
Partager