I have a macro to pull data from a piviot table. One of the items I am selecting is a drop down box of months It show last couple months through next 6-8 months. I would like my macro to select this month and next 5 months and make all others false. How can I write this. I currently rerecord my macro each month and that is getting old. Here is the part of the macro:
Sub FilterA()
Windows("One_Way_Flow.xls").Activate
Sheets("Net Flow by Week").Select
With ActiveSheet.PivotTables("PivotTable1").P… Month")
.PivotItems("Jul-13").Visible = False
.PivotItems("Feb-14").Visible = False
End With
I recorded those to be false but next month I need "Sep-13" through "Feb-14" to be true and everything else to be false. Thanks for the help.
Bookmarks