The problem I am experiencing is explained in Microsoft Knowledge Base Article - 316446.
I am trying to clear the contents of the drop down fields in multiple pivot tables within one file (each pivot table is on it's own worksheet).
We contacted MS for the fix, and this is what they gave us:
Sub Junk()
For Each itm In ActiveSheet.PivotTables(1).PivotFields("columnname".PivotItems
If itm.RecordCount = 0 Then itm.Delete
Next itm
End Sub
When I try to run this, I get an error that only says "400". Any ideas?
I am trying to clear the contents of the drop down fields in multiple pivot tables within one file (each pivot table is on it's own worksheet).
We contacted MS for the fix, and this is what they gave us:
Sub Junk()
For Each itm In ActiveSheet.PivotTables(1).PivotFields("columnname".PivotItems
If itm.RecordCount = 0 Then itm.Delete
Next itm
End Sub
When I try to run this, I get an error that only says "400". Any ideas?