PivotFields

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I get this error and I don't know how to fix it. "Unable to get the
PivotFields property of the Pivot Table Class." What does this mean and does
anyone know how to fix it. Thank you in advance....
 
Hi Neal,
It occurs when the field name used does not exist. Eg:
Dim f As PivotField
Set f = ActiveSheet.PivotTables(1).PivotFields("a")
If field "A" does not exist, it fails.

Try to display your filed names:
? ActiveSheet.PivotTables(1).PivotFields(1).Name 'then 2,3,4...
And make sure:
- the field name exist
- you are referencing the right pivot on the right sheet.

Regards,
Sebastien
 
sebastien you rock!!!

sebastienm said:
Hi Neal,
It occurs when the field name used does not exist. Eg:
Dim f As PivotField
Set f = ActiveSheet.PivotTables(1).PivotFields("a")
If field "A" does not exist, it fails.

Try to display your filed names:
? ActiveSheet.PivotTables(1).PivotFields(1).Name 'then 2,3,4...
And make sure:
- the field name exist
- you are referencing the right pivot on the right sheet.

Regards,
Sebastien
 

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

Back
Top