Hello, I've been racking my brains for 2 days on this so hopefully someone can help. Using Excel 2010, I have created a basic pivottable where one of the Pivot Fields ("month") is a date field. I've recorded the below macro to hide specific pivot items in the Month field but when I run it it fails to find the first (or any) of the Pivot items.
I've tried change the formatting of the source data, and the above code to "06/01/2011", "6/1/2011" all to no avail.
This does work OK in excel 2003 - please help
Code:
With ActiveSheet.PivotTables("PivotTable9").PivotFields("Month")
.PivotItems("01/06/2011").Visible = False
.PivotItems("01/09/2011").Visible = False
.PivotItems("01/10/2011").Visible = False
End With
I've tried change the formatting of the source data, and the above code to "06/01/2011", "6/1/2011" all to no avail.
This does work OK in excel 2003 - please help