Skip to content

Instantly share code, notes, and snippets.

@hedgejanuary
Created May 21, 2018 21:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hedgejanuary/d0360aad84c041657c513fdd8abb2e2d to your computer and use it in GitHub Desktop.
Save hedgejanuary/d0360aad84c041657c513fdd8abb2e2d to your computer and use it in GitHub Desktop.
Refresh all the pivot tables in a workbook
Private Sub Workbook_Open()
'refresh all the pivot tables in the workbook
Dim PT As PivotTable
Dim WS As Worksheet
For Each WS In Me.Worksheets
For Each PT In WS.PivotTables
PT.RefreshTable
Next PT
Next WS
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment