i am finding Problem to run this program , i Need to do the multiple selection if in case the if some data is deleted the program should neglect it and if there is one more title under " XXX_04 " it should also automatically consider as false . if you know how i can do , please help me . i am frustrated
ActiveSheet.PivotTables("PivotTable2").PivotFields("Gesenk").CurrentPage = _
"(All)"
With ActiveSheet.PivotTables("PivotTable2").PivotFields("Gesenk")
.PivotItems("11P2_04").Visible = False
.PivotItems("11P3_04").Visible = False
.PivotItems("11P4_04").Visible = False
.PivotItems("11P5_04").Visible = False
.PivotItems("11P6_04").Visible = False
.PivotItems("11P7_04").Visible = False
.PivotItems("11P8_04").Visible = False
.PivotItems("11P9_04").Visible = False
.PivotItems("12P3_04").Visible = False
.PivotItems("13P1_04").Visible = False
'.PivotItems("13P13_04").Visible = False
End With
ActiveSheet.PivotTables("PivotTable2").PivotFields("Gesenk"). _
EnableMultiplePageItems = True
ActiveSheet.PivotTables("PivotTable2").PivotFields("Gesenk").CurrentPage = _
"(All)"
With ActiveSheet.PivotTables("PivotTable2").PivotFields("Gesenk")
.PivotItems("11P2_04").Visible = False
.PivotItems("11P3_04").Visible = False
.PivotItems("11P4_04").Visible = False
.PivotItems("11P5_04").Visible = False
.PivotItems("11P6_04").Visible = False
.PivotItems("11P7_04").Visible = False
.PivotItems("11P8_04").Visible = False
.PivotItems("11P9_04").Visible = False
.PivotItems("12P3_04").Visible = False
.PivotItems("13P1_04").Visible = False
'.PivotItems("13P13_04").Visible = False
End With
ActiveSheet.PivotTables("PivotTable2").PivotFields("Gesenk"). _
EnableMultiplePageItems = True