+ Reply to Thread
Results 1 to 6 of 6

runtime 1004 error 'Unable to get the Pivotitems property of the Pivotfield class'

  1. #1
    Registered User
    Join Date
    10-08-2010
    Location
    North Yorkshire, England
    MS-Off Ver
    Excel 2003
    Posts
    69

    runtime 1004 error 'Unable to get the Pivotitems property of the Pivotfield class'

    Hello

    could some one please advise why I'm getting a runtime 1004 error 'Unable to get the Pivotitems property of the Pivotfield class' in the following macro. Highlighted where it falls over:
    HTML Code: 
    Thank you
    Last edited by DavidBW; 01-27-2012 at 10:03 AM.

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: runtime 1004 error 'Unable to get the Pivotitems property of the Pivotfield class

    Try changing that line to
    Please Login or Register  to view this content.
    If this does not work, maybe you could explain what you would want to see in your pivot and then i can help you accordingly.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    10-08-2010
    Location
    North Yorkshire, England
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: runtime 1004 error 'Unable to get the Pivotitems property of the Pivotfield class

    Unfortunately that didn't work.

    I want to be able to limit the view in the "Month Left" pivot table field to the value found in range name "Pivot Month" in the "Cover" tab.
    This macro works perfectly for another field (department). I think it may be to do with date formatting. I posed an earlier question (26/01) about Date Formatting within the row field of a pvot table which has yet to be solved "Date Format in Pivot table Row field (Excel 2003)".

  4. #4
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: runtime 1004 error 'Unable to get the Pivotitems property of the Pivotfield class

    Does it work if you change the formatting of this date filed to Number, then run the code?

  5. #5
    Registered User
    Join Date
    10-08-2010
    Location
    North Yorkshire, England
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: runtime 1004 error 'Unable to get the Pivotitems property of the Pivotfield class

    OK, I've sorted the date formatting issue (the column header in the source data was formatted to mmm-yy whereas it should have been text) however that hasn't solved the problem originally posted in this thread.

  6. #6
    Registered User
    Join Date
    10-08-2010
    Location
    North Yorkshire, England
    MS-Off Ver
    Excel 2003
    Posts
    69

    Re: runtime 1004 error 'Unable to get the Pivotitems property of the Pivotfield class

    Have tried different methods but still having same problem - any clues anyone?
    Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1