ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unable to set the orientation property of Pivitfield class (https://www.excelbanter.com/excel-programming/354926-unable-set-orientation-property-pivitfield-class.html)

anu_manu

Unable to set the orientation property of Pivitfield class
 

Hi

I wud really appreciate if somebody helps me by telling me why do i get
this runtime error whn i try to pull out data in my excel.I m using
Ms.Excel 2000.
and my code is like this

With pvtReport
..PivotFields("ConfWeight").Orientation = xlDataField
..PivotFields("Sum of ConfWeight").NumberFormat = "#,##0"

..PivotFields("Month").Orientation = xlRowField
..PivotFields("CompanyName").Orientation = xlRowField
..PivotFields("ContactName").Orientation = xlRowField
..PivotFields("PrimarySalesRep").Orientation = xlRowField
..PivotFields("SecondarySalesRep").Orientation = xlRowField
..PivotFields("PartnerManager").Orientation = xlRowField
..PivotFields("Reseller").Orientation = xlRowField
..PivotFields("ProductFamily").Orientation = xlRowField

..PivotFields("Probability").Orientation = xlColumnField
End With

I run this for a period of First day of quarter till Today's date i get
the result .
But whn i try to run it for the entire quarter i get the error.

anyhow whn i remove .PivotFields("ProductFamily").Orientation =
xlRowField
it runs fine for the full quarter.

Please help
annu


--
anu_manu
------------------------------------------------------------------------
anu_manu's Profile: http://www.excelforum.com/member.php...o&userid=31510
View this thread: http://www.excelforum.com/showthread...hreadid=518414



All times are GMT +1. The time now is 03:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com