返回用于对指定数据透视表字段进行自动排序的数据字段的名称。String 类型,只读。
本示例在消息框中显示“Product”字段的 AutoSort 参数值。
With Worksheets(1).PivotTables(1).PivotFields("product")
Select Case .AutoSortOrder
Case xlManual
aso = "manual"
Case xlAscending
aso = "ascending"
Case xlDescending
aso = "descending"
End Select
MsgBox " sorted in " & aso & _
" order by " & .AutoSortField
End With