Hi All,
I have pivotitems in the rows field. And i wanted to sort all the pivot items in the ascending order. But the pivot items doesnot fall under any data type. So i developed code to sort the pivot items based on position property existing in pivotitem.
It is working perfectly fine Excel 2000 & 2003. When i tried it in 2007 it popups with error message
code :
for j = 1 to 12
activesheet.pivottables("pivottable1").pivotfields(1).pivotitems(j).position = j +1
next
Error: "Position property of PivotItem class failed".
Please help in this regards.
Thanks in advance.
I have pivotitems in the rows field. And i wanted to sort all the pivot items in the ascending order. But the pivot items doesnot fall under any data type. So i developed code to sort the pivot items based on position property existing in pivotitem.
It is working perfectly fine Excel 2000 & 2003. When i tried it in 2007 it popups with error message
code :
for j = 1 to 12
activesheet.pivottables("pivottable1").pivotfields(1).pivotitems(j).position = j +1
next
Error: "Position property of PivotItem class failed".
Please help in this regards.
Thanks in advance.