Consulting

Results 1 to 4 of 4

Thread: VBA CODE OLAP Pivot Table Excel 2007

  1. #1

    VBA CODE OLAP Pivot Table Excel 2007

    Hi,

    I have a workbook with a pivot tables on each tab, these pivot tables are connected to an OLAP Cube in MS SQL Server database, I am trying to update all pivots programmatically by changing the filter items. Any help is appreciated.
    Thx

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    When you say update, do you mean you wish to change whata is being filtered, or add/remove items from therows/columns?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    I mean change what it is filtered.

  4. #4
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    You have to specify the dimension, the item in the dimension and the value.

    This is an example from one of mine

    [vba]

    ActiveSheet.PivotTables("myPivot").PivotFields( _
    "[Location Master].[Location Hierarchy]").CurrentPageName = _
    "[Location Master].[Location Hierarchy].[Location Type].&[BONDED]"
    [/vba]
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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