I have a pivot that I want to NOT re-sort after changing a filter. This would replicate in code the effect of right clicking the sorted field's drop-down arrow and going to More Options and unchecking the box for "Sort automatically every time the report is updated". I tried the macro recorder, but it didn't show anything.
I am sorting the pivot off a total including all options. I then want the order of my Rows to stay the same as I exclude/include certain options. Setting PivotFields.Autosort=xlManual just seemed to turn off and undo the sorting I do want. The line of code below is how I currently am sorting it. This works, I just want it to not keep autosorting.
PivotTables("PivotTable1").PivotFields("Category").AutoSort xlDescending, "Count of Category"
Example:
If my original table is this when I filter for "A":

When I change the filter to now filter for "B", I want the Categories (rows in the pivot) to stay in the same order, and not re-sort automatically by the Total. So it would look like this:
