Feedback by UserVoice

Guillermo J Wainselboim

My feedback

  1. 55 votes

    We're glad you're here

    Please sign in to leave feedback

    Signed in as (Sign out)

    We’ll send you updates on this idea

    An error occurred while saving the comment
    Guillermo J Wainselboim commented  · 

    Saw this posting, and thought it may help out, try's running an update and gives you the sheets that have errors and which pivot tables are the problem. I tried it and seemed to work, and working to see if by moving pivot tables actually works

    Sub PivotCheck()
    '
    ' PivotCheck Macro
    ' Running this macro will refresh all the pivot tables in the workbook. IF there are errors, a window will pop up and tell you which pivot table and what worksheet is causing the error. Why excel does not do this automatically is a mystery. Party on.
    '
    Dim pt As PivotTable
    Dim wks As Worksheet
    For Each wks In ActiveWorkbook.Worksheets
    For Each pt In wks.PivotTables
    On Error Resume Next
    pt.PivotCache.Refresh
    If Err <> 0 Then MsgBox "pivot table """ & pt.Name & """" & vbCr & _
    "refresh error on " & vbCr & "worksheet """ & wks.Name & """"
    Next pt
    Next wks
    Set pt = Nothing
    Set wks = Nothing
    '
    End Sub

Feedback and Knowledge Base