run-time error 1004 Unable to get the PivotFields property of the PivotTable Class

cwelt21

New Member
Joined
Oct 30, 2017
Messages
6
I'm running into a strange problem, for many years I have used these excel macros and all of a sudden I started to receive errors that only appear on one computer. This macro and pivot issue doesn't exist on any other computer I have tried. So excel was uninstalled and a fresh clean updated copy has been installed and the issue still exists.

run-time error 1004 Unable to get the PivotFields property of the PivotTable Class

VBA notes the error being located with the code of:

ActiveSheet.PivotTables(1) .PivotFields("count of quantity") .Function = xlSum

Any ideas of why I would have this issue on one computer only?.. Also please note this worked fine for many years on this same computer and then one day just developed this problem out of nowhere.
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
i was able to get around the issue by replacing count with sum, it seams to work differently on newer versions of excel.
 
Upvote 0
It is an old topic but I have the same problem here. Have you resolved your issue?
Same here- different between versions of excel. Using Office 365 on one machine and 2013 on another. It works in Office 365, but fails on 2013. Did you solve your issue?
 
Upvote 0

Forum statistics

Threads
1,223,903
Messages
6,175,286
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top