Dynamic Pivot Item Selection

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
 
R

ryguy7272

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top