unable to get the pivotfields property of the pivottable class

  • Follow


In an Excel macro to create a pivot table, I am suddenly getting this 
message:  unable to get the pivotfields property of the pivottable class.  
This used to work fine and nothing changed.  Any ideas on this?  The code is 
shown:

Sheets("Reorder").Select
    With ActiveSheet.PivotTables("PivotSKU").PivotFields("Month-Yr")
        .Orientation = xlRowField
        .Position = 1
    End With
0
Reply Utf 1/6/2010 2:27:01 AM

dhstein;603402 Wrote: 
> In an Excel macro to create a pivot table, I am suddenly getting this
> message:  unable to get the pivotfields property of the pivottable
> class.
> This used to work fine and nothing changed.  Any ideas on this?  The
> code is
> shown:
> 
> Sheets("Reorder").Select
> With ActiveSheet.PivotTables("PivotSKU").PivotFields("Month-Yr")
> .Orientation = xlRowField
> .Position = 1
> End With

Depending on version of Excel you are using, you have probably hit a
limit in the amount of rows that the PivotTable can handle (around 8,000
rows). This is a known issue, still existent in Excel 2003 and 2007 (to
somewhat lesser extent).

In order to resolve the issue, you may need to reduce the number of
PivotFields used. What this does, in effect, is reduces the number of
rows returned as results, hence bypasses the limit.

Many people have had this problem and Microsoft has been very silent
about it and digressing the issue to something else, basically unable to
help people. For a good intro on the subject you may want to read:
'Is an Excel bug that set PivotItem.Visible to true will generate 1004
Macro Error?' (http://tinyurl.com/yese65m)

and search Google with "unable to get the pivotfields property of the
pivot table class"

Hope this has been helpful.

--
'MrSpreadsheet (MrSpreadsheet) on Twitter'
(http://twitter.com/MrSpreadsheet)


-- 
MrSpreadsheet
------------------------------------------------------------------------
MrSpreadsheet's Profile: 1365
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=167326

[url="http://www.thecodecage.com"]Microsoft Office Help[/url]

0
Reply MrSpreadsheet 1/6/2010 7:38:03 AM

1 Replies
1038 Views

(page loaded in 0.034 seconds)


Reply: