• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Excel VB pivot table

RizAbdullah

New Member
I am sure this questions must have already been asked and answered, but I am novice and hope somebody will help me. I am trying to create a macro which will loop through a pivot table Department field (This report comes from Power BI OLAP query) copy and paste the report data on to another spreadsheet and then come back to this report and look through.
I am getting error message (Run time error 1004: unable to get the pivotfields property of the pivottable class). I believe issue is with the pivotfield name Department, I have tried renaming the actual field name on the pivot to Dept still same error highlighted in bold. Any help would be very much appreciated. Many thanks in advance Here is my code:
84208
 
RizAbdullah
You've noted about Cross-posting.
Please reread and follow Forum Rules - those are for You too:
  • Cross-Posting. Generally, it is considered poor practice to cross post. That is to post the same question on several forums in the hope of getting a response quicker.
  • If you do cross-post, please put that in your post.
  • Also if you have cross-posted and get an Solution elsewhere, have the courtesy of posting the Solution here so other readers can learn from the answer also, as well as stopping people wasting their time on your answered question.

    After You've reread Forum Rules, You'll know - what to do next.
 
Back
Top