Dayu has attended:
Excel VBA Introduction course
Excel VBA Intermediate course
update privotable
how to use vba to update privotable
RE: update privotable
Hello Dayu,
Thank you for your question. Here is some code which will update all Pivot Tables in your workbook:
Sub 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
I hope this works for you.
Kind regards
Marius Barnard
STL