I want autosort a filed "Sort To" based on the value named "Quantity" in the grand total column, which is the 57th and the last column. (PivotTableName has been assigned value, which works in other part of the macro).

Got error message:
error 438 "object doesn't support this property or method

What is wrong?

PivotSheet.PivotTables(PivotTableName).PivotField("Sold To").AutoSort xlDescending, "Quantity", PivotSheet.PivotTables(PivotTableName).PivotColumnAxis.PivotLines(57),1