Remove all column and row fields from a pivot table
Hi Takuto
This will remove all the items in your pivot table so you have a blank
table. Ready to populate with new information.
Take care
Marcus
Sub RemovePTItems()
'Removes all items in pivot table
Dim pt As PivotTable
Dim i As Integer
Set pt = ActiveSheet.PivotTables(1)
i = pt.PivotFields.Count
For Count = 1 To i
On Error Resume Next
pt.PivotFields(Count).Orientation = xlHidden
Next Count
End Sub
|