Turn Off Pivot Table Autosort

  • Thread starter Thread starter The Vision Thing
  • Start date Start date
T

The Vision Thing

I'm using the following code to sort a column by a specified column:

pivotName.PivotFields(arrAttributes(i)).AutoSort xlDescending, "$-Latest
Qtr"

How do I programmatically turn off autosort so that I can programmatically
turn off all filters?

Thanks,
Wayne C.
 
You can set AutoSort to manual, e.g.:

Sub PivotSort()
Dim pf As PivotField
Set pf = ActiveSheet.PivotTables(1).PivotFields("Item")

pf.AutoSort xlManual, pf.Name

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top