Turn on the macro recorder, then go through the steps of building your pivot
table. After you build your pivot table, double-click on the 'pivot' in the
upper left corner of the pivot table. A screen pops up; click on 'Advanced'
then choose your 'AutoSort Options'.
After you do all that, go back and check your code. You syntax will be
different from mine, but eventually, you should probably get code somewhat
similar to this
ActiveSheet.PivotTables("PivotTable1").PivotFields(Sheets("Summary").Range("C5").Value).AutoSort _
xlDescending, "Count of "
Just try it and see what happens. You may be pleasantly surprised!!
Regards,
Ryan---