Pivot Items Filter using VBA
Hello
I have a code which make a Pivot using VBA. however there is a condition that I am unable to fulfilled in that pivot using my VBA.
I will try to write it here the code I wish for.
ActiveSheet.PivotTables("PivotTable2").PivotFields _ ("ReportTimeframe") .CurrentPage = "(All)"
With ActiveSheet.PivotTables("PivotTable2").PivotFields ("Report Timeframe")
.PivotItems.Last Month.Visible = True
.PivotItems.All Other Months.Visible = False
End With
I want a fix in my underline codes above.
Any help in this would be appreciable.
__________________
Regards
Gaurav
|