update pivot table (excel 2010)

  • i'm using a pivot table to filter data and return results (works well).


    the filtering works fine (see sample below) , but i'm not sure of the "best" way to update the table (i have found the following
    three ways)
    --and i should make sure that the underlying data source is refreshed-at the least for the first time I run the pivot table filter


    Code
    '...
    Worksheets("Calc").PivotTables("PT").PivotFields("Model").ClearAllFilters
    Worksheets("Calc").PivotTables("PT").PivotFields("Model").CurrentPage = rca
    '...    
            Worksheets("Calc").PivotTables("PT").RefreshTable
            Worksheets("Calc").PivotTables("PT").Update
            Worksheets("Calc").Calculate



    thank you.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!