I have a workbook containing OLAP Pivot Tables. It needs to be updated on a monthly basis, so I want to build a macro that adds the previous month to one of the filters on a table. When filtered correctly There will be a few dozen items selected in the filter for this field and 3 or 4 items unselected in the filter. The number of items (months) selected increases by one each month.
The problem is that I keep getting error messages for everything I try. None of the Pivot Field Object Members I try seem to work...
AddPageItem:
Visible:
PivotFilters:
All of these yield errors, usually "Application-Defined or Object-Defined error". Sometimes "Unable to get the Pivot Items property of the Pivot Field class".
The only thing that works is VisibleItemsList:
Unfortunately, that would require me to enter all of the selected months each time. Since the list is 30+ months long and will increase by 1 every month ad infinitum that is a bit impractical.
Why are none of the other Object Members working? I am open to any suggestion that will let me easily do what I'm trying to do...
I appreciate your help.
Bookmarks