1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
ilot = Range("B28").Value
ActiveSheet.ChartObjects("Graphique 1").Activate
With ActiveChart.PivotLayout.PivotTable.PivotFields("SECTEUR")
If ilot Like "ILOT_3_AXES" Then
.PivotItems("ILOT_3_AXES").Visible = True
.PivotItems("ILOT_4_AXES").Visible = False
.PivotItems("ILOT_BRIDES").Visible = False
.PivotItems("ILOT_CITIZEN").Visible = False
.PivotItems("ILOT_CU").Visible = False
.PivotItems("ILOT_GARRET").Visible = False
.PivotItems("ILOT_MAZAK").Visible = False
.PivotItems("ILOT_MULTIAXE").Visible = False
.PivotItems("ILOT_PRECISION").Visible = False
.PivotItems("ILOT_SCIES").Visible = False
ElseIf ilot Like "ILOT_4_AXES" Then
.PivotItems("ILOT_4_AXES").Visible = True
.PivotItems("ILOT_3_AXES").Visible = False
.PivotItems("ILOT_BRIDES").Visible = False
.PivotItems("ILOT_CITIZEN").Visible = False
.PivotItems("ILOT_CU").Visible = False
.PivotItems("ILOT_GARRET").Visible = False
.PivotItems("ILOT_MAZAK").Visible = False
.PivotItems("ILOT_MULTIAXE").Visible = False
.PivotItems("ILOT_PRECISION").Visible = False
.PivotItems("ILOT_SCIES").Visible = False
End if |