how to select multiple items in pivot table using vba and program in such a way that next input should take automaticly

ank007

New Member
Joined
Sep 6, 2016
Messages
1
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
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.

Forum statistics

Threads
1,223,236
Messages
6,170,912
Members
452,366
Latest member
TePunaBloke

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top