+ Reply to Thread
Results 1 to 2 of 2

pivot cache

  1. #1
    Registered User
    Join Date
    12-19-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    6

    pivot cache

    I am trying to update pivot tables in my workbook automatically through VBA. However, my updates are not correct and I'm pretty sure it's due to the pivot cache. If I start by running the report for 12/1/12, the data in my pivot table doesn't change even though the underlying table filters correctly. If I then run my report for 12/2/12, the pivot table will show the 12/1/12 data and the underlying table filters correctly for 12/2/12.

    How do I get this to update correctly?

    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    12-19-2012
    Location
    Ohio
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: pivot cache

    If I stop the code after the query refresh, then run through the pivot cache refresh, it will refresh correctly. If I don't stop the code, it will not update the pivot cache.
    So my next question is this - is there a way to stop the execution, then start it again automatically? (Pausing the code doesn't work. End Sub doesn't work. It has to be a stop in the execution.)

    I would upload a sample of the spreadsheet, but I don't think it'll work due to the MS Query connection. Theoretically the code is sound. The user inputs "start date" and "end date", then the query pulls only the production information for the date range indicated. The pivot table should then update to reflect what the query has pulled. But still, the pivot table refresh is lagging by one entry. It's like it's getting held up in the cache. Everything I have read says that the pivotcache.refresh should automatically refresh the pivot table with 'current' data. I've tried every code I can find or think of. What am I doing wrong?

    Here is my complete code.

    Please Login or Register  to view this content.
    Again, if I put a "stop" in after the refresh all, everything will update. If I don't, the pivot table refreshes according to the previous entry instead of the current entry. I am ready to pull my hair out. Trust.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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