unable to get the pivotfields property of the pivottable class

D

dhstein

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
 
M

MrSpreadsheet

dhstein;603402 said:
In an Excel macro to create a pivot table, I am suddenly getting this
message: unable to get the pivotfields property of the pivottabl
class.
This used to work fine and nothing changed. Any ideas on this? Th
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
limit in the amount of rows that the PivotTable can handle (around 8,00
rows). This is a known issue, still existent in Excel 2003 and 2007 (t
somewhat lesser extent).

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

Many people have had this problem and Microsoft has been very silen
about it and digressing the issue to something else, basically unable t
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 100
Macro Error?' (http://tinyurl.com/yese65m)

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

Hope this has been helpful.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top