Dynamic Pivot Item Selection

  • Thread starter Thread starter StephanieH
  • Start date Start date
S

StephanieH

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
 
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---
 
Back
Top