+ Reply to Thread
Results 1 to 2 of 2

VBA not updating Pivot Table

Hybrid View

STUARTXL VBA not updating Pivot Table 08-19-2016, 08:30 AM
PCI Re: VBA not updating Pivot... 08-19-2016, 03:43 PM
  1. #1
    Banned User!
    Join Date
    09-26-2015
    Location
    Manchester
    MS-Off Ver
    2013
    Posts
    218

    VBA not updating Pivot Table

    Hi All,

    With reference to the attached:
    - This is part of a stock control spreadsheet but all other tabs have been deleted for commercial sensitivity reasons
    - The tab 'Withdrawal Detail' exists so that a member of the stock control team can input the data noted on a 'Stock Requisition Form'
    - Tab 'Withdrawal Summary' hosts several pivot tables (one per month) with summarises the stock withdrawal activity contained on the 'Withdrawal Detail' tab
    - The VBA/Macro button on the 'Withdrawal Summary' tab updates these totals every time it is pressed (and it is pressed every time the 'Withdrawal Detail' tab is updated)
    - The macro is updating the totals correctly for the pivot tables for Jan-16 - Jun-16 but the pivot table for Jul-16 is also reflecting the values of the month of Jun-16 contained on the 'Withdrawal Detail' tab.

    Can somebody advise why this is happening and list a step by step walkthrough for correcting this?

  2. #2
    Forum Expert
    Join Date
    12-24-2007
    Location
    Alsace - France
    MS-Off Ver
    MS 365 Office Suite
    Posts
    5,088

    Re: VBA not updating Pivot Table

    Just refreshing manually the Pivot table for July gives the good result
    Perhaps try next code
    Sub Refresh2()
    Dim PT   As PivotTable
       For Each PT In Worksheets("Withdrawal Summary").PivotTables
          PT.PivotCache.Refresh
       Next
    End Sub
    - Battle without fear gives no glory - Just try

+ 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] updating dynamic table from pivot table
    By Bax in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-20-2013, 06:31 AM
  2. Excel 2007 : Updating a pivot table
    By sshanku1985 in forum Excel General
    Replies: 3
    Last Post: 03-17-2011, 12:08 AM
  3. Pivot Table Not Updating
    By AnthonyWB in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-31-2011, 10:25 AM
  4. Need help updating Pivot table
    By bblevins in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-09-2008, 03:37 PM
  5. updating pivot table
    By Gibran in forum Excel General
    Replies: 1
    Last Post: 10-11-2005, 06:05 PM
  6. Pivot Table updating
    By Pjcan1 in forum Excel General
    Replies: 1
    Last Post: 06-14-2005, 12:13 PM
  7. Pivot Table not Updating
    By Ranelle in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 06-13-2005, 12:13 PM
  8. [SOLVED] Error updating pivot table
    By Philip McComish in forum Excel General
    Replies: 0
    Last Post: 01-28-2005, 01:06 PM

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