Share via

Excel Update Broke PivotCache VBA Functionality — Request for Fix or Escalation

Murray, ThomasJ (Penske) 15 Reputation points
2026-01-28T19:16:45.0766667+00:00

Since a recent Microsoft 365 Excel update ~January 24/25, multiple VBA procedures that interact with PivotCaches and update PivotTables have stopped functioning across our organization. These macros have worked reliably for years and stopped functioning immediately after the latest Excel desktop update.

Specifically, code that includes calls such as:

  • PivotCache.Refresh
  • PivotTables("…").ChangePivotCache
  • ActiveWorkbook.PivotCaches.Create(...)
  • Even code generated by the Macro Recorder fails on execution

This issue is creating operational disruption because:

  • Existing automation for data refresh and reporting is failing.
  • PivotTables cannot be updated programmatically as before.
  • Even newly recorded macros that should simply refresh or update PivotTables fail.

None of the AI-generated fixes have solved the problem. Is there a workaround?

Developer technologies | Visual Basic for Applications

2 answers

Sort by: Most helpful
  1. Kai-L 13,200 Reputation points Microsoft External Staff Moderator
    2026-01-28T21:36:52.94+00:00

    Dear @Murray, ThomasJ (Penske),

    Thank you for reaching out to Microsoft Q&A forum.

    I’m really sorry this broke longstanding workflows across your organization. As a forum moderator, I genuinely wish I could directly access your account or delve into the backend systems to diagnose and fix this for you. However, our role here is limited to providing general guidance and solutions that can be applied by users.  

    Since this issue is causing significant disruption across your organization, I recommend the following two‑pronged approach:

    1.Revert to a Previous Office Build

    Rolling back to an earlier version of Office can temporarily restore full PivotCache and PivotTable VBA functionality while Microsoft works on a fix. For detailed instructions, please refer to the official Microsoft article: How to revert to an earlier version of Office.

    2.Contact Microsoft Support

    The Global Admin in your organization can create a service request with Microsoft Support. A technical support engineer can perform a remote session to investigate the situation, verify the backend configurations, and run any necessary synchronization tools to resolve the problem. If the issue requires further attention, they can escalate it to a specialized team for deeper analysis. Ask The Global Admin in your organization to create a service request with Microsoft support to get advanced technical assistance and diagnostics. For detailed instructions on how to get support, please refer to Get support - Microsoft 365 admin. If you don't know who your IT administrator is, please refer to this article: How do I find my Microsoft 365 admin? - Microsoft Support 

    For additional assistance, use this link to find the appropriate contact number from your region: Global Customer Service phone numbers - Microsoft Support 

    I truly hope you get your issue resolved swiftly. Please know that even though I can't directly intervene, directing you to the correct, specialized support is the most effective help I can provide from my position. Thank you for your patience and understanding. I'm looking forward to your reply.  


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".  

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 

    Was this answer helpful?

    1 person found this answer helpful.

  2. ychi-7143 0 Reputation points
    2026-05-03T06:10:23.8333333+00:00

    I have been experiencing a similar issue since May 1, 2026. Below are the details of the investigation I conducted in my environment and the temporary workaround I implemented.

    Issue

    Executing PivotCache.Refresh and PivotTable.RefreshTable from a VBA macro throws Run-time error '1004', and the PivotTable cannot be updated. This was working perfectly fine until April 30, 2026, but the issue started occurring from May 1 onwards.

    Confirmed Facts

    • No changes were made to the macro or the data structure.
    • At the exact same time, manually clicking the "Refresh All" button on the Excel ribbon updates the PivotTable successfully.
    • Executing PivotCache.Refresh directly from the VBA Immediate Window succeeds.
    • Calling the same method via VBA code (during macro execution) fails.
    • I confirmed via the Immediate Window that the data count, content, and reference range (Named Range) are all normal.

    Environment

    • Excel 2021 (One-time purchase version)
    • Version 2604 (Build 19929.20106 Click-to-Run)

    Suspected Cause

    It seems possible that a recent Excel update may have affected the behavior of PivotCache manipulation methods via VBA. The fact that manual UI operations and direct VBA execution (Immediate Window) succeed, while it only fails within the macro execution context, suggests there might be an unexpected compatibility issue in certain execution environments.

    Workaround

    Instead of using the PivotCache.Refresh and RefreshTable methods, I managed to bypass the issue by using Application.CommandBars.ExecuteMso "RefreshAll", which is equivalent to the ribbon UI operation.

    Remaining Risks

    Since RefreshAll updates all PivotTables in the workbook, this deviates from the original design, which targeted only specific PivotTables. I will consider reverting to the original code if this behavior is addressed in a future update.

    Source Code

    ExcelVBA

    Sub PVT_SetVisbleItem_SetTimelineState()    
        Dim WsDBTM As Worksheet: Set WsDBTM = ThisWorkbook.Worksheets("PVTat5day")
        Dim WsMysh As Worksheet: Set WsMysh = ThisWorkbook.ActiveSheet
        WsDBTM.Select
    
        
        '// 20260503: The original code below started throwing an error, so substituting it with the following. Possibly caused by a Microsoft update.
        '// WsDBTM.PivotTables("pivottable_PVTat5day").PivotCache.Refresh  '// Refresh PVT data
        Application.CommandBars.ExecuteMso "RefreshAll"
        DoEvents  '// Wait for the UI update to complete
    
        
        With WsDBTM
            '// Clear the PivotTable filter
            WsDBTM.PivotTables("pivottable_PVTat5day").PivotFields("item").ClearAllFilters
    
            
            '// Set the timeline to the values entered in the cells
            '   Start/End points of "Contract Start Date" / Start/End points of "Agreement End Date"
            .Range("A1").Select
            ActiveWorkbook.SlicerCaches("NativeTimeline_stContract").TimelineState. _
                                                                         SetFilterDateRange .Range("G2").Value, .Range("H2").Value
            ActiveWorkbook.SlicerCaches("NativeTimeline_edContract").TimelineState. _
                                                                         SetFilterDateRange .Range("G3").Value, .Range("H3").Value
        End With
    

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.