![]() |
Dynamic Pivot Item Selection
The folliwing works to no longer show specific fields. How can I rework this
to show all January dates (the specifics will vary) and not show any other months. I'll be appending additional dates daily, but want the end user to easily select only the month they want to review. With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Date") .PivotItems("1/7/2009").Visible = False .PivotItems("1/8/2009").Visible = False .PivotItems("1/9/2009").Visible = False .PivotItems("1/10/2009").Visible = False .PivotItems("1/12/2009").Visible = False .PivotItems("1/13/2009").Visible = False .PivotItems("1/14/2009").Visible = False .PivotItems("1/15/2009").Visible = False .PivotItems("1/16/2009").Visible = False .PivotItems("1/17/2009").Visible = False End With |
Dynamic Pivot Item Selection
Hummm, something seems pretty weird here. What are you REALLY trying to do?
Do you have more code? Why don't you set up some kind of key, like 1=January, and then filter out all non-matches; show just 1s, for instance. Ryan--- -- Ryan--- If this information was helpful, please indicate this by clicking ''Yes''. "StephanieH" wrote: The folliwing works to no longer show specific fields. How can I rework this to show all January dates (the specifics will vary) and not show any other months. I'll be appending additional dates daily, but want the end user to easily select only the month they want to review. With ActiveSheet.PivotTables("PivotTable1").PivotFields ("Date") .PivotItems("1/7/2009").Visible = False .PivotItems("1/8/2009").Visible = False .PivotItems("1/9/2009").Visible = False .PivotItems("1/10/2009").Visible = False .PivotItems("1/12/2009").Visible = False .PivotItems("1/13/2009").Visible = False .PivotItems("1/14/2009").Visible = False .PivotItems("1/15/2009").Visible = False .PivotItems("1/16/2009").Visible = False .PivotItems("1/17/2009").Visible = False End With |
All times are GMT +1. The time now is 09:08 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com