+ Reply to Thread
Results 1 to 5 of 5

VBA Pivot Table Cache Error

  1. #1
    Registered User
    Join Date
    01-11-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Lightbulb VBA Pivot Table Cache Error

    Hi,

    I am new at VBA and currently working on the following piece of code that seems to throw an error at the PivotCache creation:

    Please Login or Register  to view this content.
    This is based on the following code:
    https://www.thespreadsheetguru.com/b...l-pivot-tables

    Thanks

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: VBA Pivot Table Cache Error

    Hi,
    Perhaps you have spaces in the sheet name, in which case use
    Please Login or Register  to view this content.
    It is also better to use R1C1 referencing with the address.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Registered User
    Join Date
    01-11-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Re: VBA Pivot Table Cache Error

    Hi! Thanks very much for your help,
    I updated that line to: SrcData = "'" & ActiveSheet.Name & "'!" & ActiveCell.CurrentRegion.Address(ReferenceStyle:=xlR1C1)

    I still get the following error:
    ErrorVBA.JPG

  4. #4
    Registered User
    Join Date
    01-11-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Re: VBA Pivot Table Cache Error

    Would it make sense to clear the Pivot Caches ?

  5. #5
    Registered User
    Join Date
    01-11-2018
    Location
    London
    MS-Off Ver
    2016
    Posts
    4

    Re: VBA Pivot Table Cache Error

    I just ran it again, it seems to work ! I'll probably be back
    Thanks !

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Macro to update pivot tables and use the SAME cache instead of repeatedly recreating cache
    By Fowzee1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-22-2015, 11:26 PM
  2. Adding a new pivot table using same pivot cache on a new worksheet
    By pdalal in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-10-2015, 05:58 AM
  3. Pivot cache error
    By Ricardo Mass in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-26-2013, 05:06 AM
  4. Pivot Table Cache
    By yawnzzzz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-06-2011, 11:49 PM
  5. Pivot Table Cache
    By pivot in forum Excel General
    Replies: 5
    Last Post: 07-08-2009, 11:30 AM
  6. Pivot table cache
    By keithmorphett in forum Excel General
    Replies: 3
    Last Post: 11-16-2007, 06:56 AM
  7. error message with Pivot Cache
    By Wolfram Schneider in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-26-2005, 02:06 AM

Tags for this Thread

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