+ Reply to Thread
Results 1 to 2 of 2

Pivot Table refresh

Hybrid View

  1. #1
    Registered User
    Join Date
    04-13-2012
    Location
    Tauranga, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    15

    Red face Pivot Table refresh

    Morning, I have a Olap pivot table that I can't get to update

    Using this code works fine

    Sub Test()
    Dim Table As PivotTable Dim Field As PivotField Set Table = Worksheets("Pivot Sheet").PivotTables(1) Set Field = Table.PivotFields("[Brand].[Brand].[Brand]") List = Field.VisibleItemsList Field.VisibleItemsList = Array("[Brand].[Brand].&[APPLE]&[062]")
    The pivot table updates the information perfectly, but if I want to select all the Brands in the pivot table the following does not update.

    Sub Test()
    Dim Table As PivotTable Dim Field As PivotField Set Table = Worksheets("Pivot Sheet").PivotTables(1) Set Field = Table.PivotFields("[Brand].[Brand].[Brand]") List = Field.VisibleItemsList Field.VisibleItemsList = Array("")
    I have recorded a macro to see how VBA does it, and it is pretty much the same.

    I have tried unsuccessfully each of the following...

    Running the Macro that VBA recorded.
    Going to the Pivot Table toolbar and clicking refresh
    Table.Update
    Table.ManualUpdate = False / True
    Table.RefreshTable
    Table.PivotCache.Refresh
    Swearing at it

    How ever if I go the the Brand drop down, all the brands are selected, and if I press OK without changing the selection, then it updates fine.

    It seems there are many people with similar problems, but I can't figure this out. Any ideas?

    Thanks
    Grant McConville

  2. #2
    Registered User
    Join Date
    04-13-2012
    Location
    Tauranga, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Pivot Table refresh

    Solved, to select all use
    Field.ClearAllFilters

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1