on-internet
← Community

Pivot Filter - Excel VBA, PivotItems not returning anything

Stack Overflow ·

I have a pivot table with a date field as a filter. I want to filter the date for a specific range specified by the user. I found this code: VBA Pivot Filter - Date Range and I am trying to recreate the method, but I'm not getting results. My pivot is based on a merge query that I loaded into the data model, and then I created the pivot from the data model. In the code below, .ClearAllFilters works, but PivotItems.Count returns 0, and I get an error when trying to return PivotItems(1). The error is: Unable to get the Item property of the PivotItems class. If I view locals and try to click on t

Comments

Sign in or sign up to comment and upvote.

No comments yet.