Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

update privotable

ResolvedVersion 2016

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

Mon 4 Dec 2017: Automatically marked as resolved.

Excel tip:

Charts

Select the data and press the function key F11 and the chart will be created on a separate worksheet.

View all Excel hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.11 secs.