Karthik Thandapani
Member
Hi,
Can anyone help me with a vba code snippet to refresh pivot table one by one. Presently I have this to refresh all.
ub RefreshAllPivotTables()
Dim PT As PivotTable
Dim WS As Worksheet
For Each WS In ThisWorkbook.Worksheets
For Each PT In WS.PivotTables
PT.RefreshTable
Next PT
Next WS
End Sub
At times, it throws up below error;
"Excel cannot complete this task with available resources. Choose less data or close other applications."
Can anyone help me with a vba code snippet to refresh pivot table one by one. Presently I have this to refresh all.
ub RefreshAllPivotTables()
Dim PT As PivotTable
Dim WS As Worksheet
For Each WS In ThisWorkbook.Worksheets
For Each PT In WS.PivotTables
PT.RefreshTable
Next PT
Next WS
End Sub
At times, it throws up below error;
"Excel cannot complete this task with available resources. Choose less data or close other applications."