+ Reply to Thread
Results 1 to 5 of 5

RefreshTable method of PivotTable class failed

  1. #1
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    RefreshTable method of PivotTable class failed

    This is the code I am using:
    Please Login or Register  to view this content.
    I receive the following error message, which I don't understand: RefreshTable method of PivotTable class failed
    I would appreciate any help.
    Thanks in advance
    Last edited by Aland2929; 02-27-2012 at 12:58 PM.

  2. #2
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Re: RefreshTable method of PivotTable class failed

    Hi Buddy,


    Try Specifying the Sheet name if its only 1 sheet that is being refreshed:
    Please Login or Register  to view this content.
    If You want to Refresh Certain sheets then use this:

    Please Login or Register  to view this content.
    Mr MaGoo
    Magoo.Inc MMVII

    If i've helped please add to my Rep by Clicking on the Blue Scales in the top right hand corner of the post

  3. #3
    Forum Contributor
    Join Date
    06-11-2009
    Location
    Cape Town
    MS-Off Ver
    Microsoft 365
    Posts
    854

    Re: RefreshTable method of PivotTable class failed

    Thanks very much for your reply. I found the problem. I renamed the file with a different name. I had to go to Options and Change Data Source and then the above code worked. Once again, thanks for your response.

  4. #4
    Registered User
    Join Date
    03-18-2015
    Location
    India
    MS-Off Ver
    10
    Posts
    1

    Re: RefreshTable method of PivotTable class failed

    I am unable to find fix for this problem. I tried your approaches.

  5. #5
    Registered User
    Join Date
    03-08-2012
    Location
    Columbus, Ohio
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: RefreshTable method of PivotTable class failed

    I had the same problem and solved it. Here was my problem...
    I had a dynamic named range for the data source. The named range counted the number of columns COUNTA(ErrorMessages!$1:$1) in my data (and number of records COUNTA(ErrorMessages!$A:$A) in the list). I happened to add some text to the very first row outside the list range and the refresh tried to add an extra column that did not have a column header.

    The dynamic named range (Raw_Error_Data) was:
    =OFFSET(ErrorMessages!$A$1,0,0,COUNTA(ErrorMessages!$A:$A),COUNTA(ErrorMessages!$1:$1))

    I removed the spurious text in the first row and everything worked.

+ 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