ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   loop on pivot items (https://www.excelbanter.com/excel-programming/410145-loop-pivot-items.html)

markx

loop on pivot items
 
Hi guys,

I would like to print one after another all the ".Pivot Items" that are in
the pivot table I'm working with. The loop would go somehow like this...

With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Field 1")
..PivotItems("Item No 1").Visible = True (and all the others are = False)
End With
Range("M3").Select
Selection.CurrentRegion.Select
Selection.PrintOut

then the same process but with the next .Pivot Item... until the last one,
where we define somehow that all Pivot Items should be visible again.

Do you have any idea how to set up a loop like this?
Thanks for your help,
Markx




All times are GMT +1. The time now is 11:19 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com