I have this code :
我有这个代码:
Sub RvsP()
Dim objTable As PivotTable, objField As PivotField
Range("A1").Select
Set objTable = Sheet2.PivotTableWizard
Set objField = objTable.PivotFields("Real Resolution Provided to Client")
objField.Orientation = xlRowField
Set objField = objTable.PivotFields("Priority")
objField.Orientation = xlColumnField
Set objField = objTable.PivotFields("Priority")
objField.Orientation = xlDataField
Dim pf As PivotField
Set pf = ActiveSheet.PivotTables(1).PivotFields("Real Resolution Provided to Client")
pf.DataRange.Cells(1).Group Start:=True, End:=True, Periods:=Array(False, False, _
False, False, True, False, False)
End Sub
Sub RvsP()