If the field is set for automatic sort, you might get that error.
Add code to set the sort to manual, e.g.:
With ActiveSheet.PivotTables("PivotTable1").PivotFields("TeamMembers")
.AutoSort xlManual, .Name
> Hey guys,
>
[quoted text clipped - 26 lines]
>
> Mark

Signature
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html
markx - 28 May 2008 09:32 GMT
hi Debra,
Unfortunately, even if I insert the code you suggested (.AutoSort xlManual,
.Name), the problem remains...So it should be something else then?
It's really a pity, because other than this, the code is doing a wonderful
job!
Rgds,
Mark
> If the field is set for automatic sort, you might get that error.
> Add code to set the sort to manual, e.g.:
[quoted text clipped - 33 lines]
>>
>> Mark