Reputation: 699
I'm totally flabbergasted
I have this line of code and I get this error everytime. I've tried so many things, putting it into variables, checking if all of the names are correct, clearing the cache, nothing seems to work.
Sheets("Uren verschil per vestiging").PivotTable("Draaitabel1").PivotFields("jaar mutatie").PivotItem(Year(Date)).Visible = True
Upvotes: 0
Views: 2090
Reputation: 3006
Seems the syntax is off by one s:
Sheets("Uren verschil per vestiging").PivotTables("Draaitabel1").PivotFields("jaar mutatie").PivotItems(CStr(Year(Date))).Visible = True
Upvotes: 1