Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Olap Cubes - Automatic Select
Hi,
I would like to select a value in a pivot field automatically from information on a list box. My pivot table is built on an Olap Cube. I already have the following code for changing the pivot: ActiveSheet.PivotTables("Pivottable1").PivotFields ("[MKT]").CurrentPageName = _ "[MKT].[All].[NEW YORK]" Now I want the value chosen in the listbox to be used as a variable LTemp = CurList.List(CurList.ListIndex) ActiveSheet.PivotTables("Pivottable1").PivotFields ("[MKT]").CurrentPageName = _ "[MKT].[All].[LTemp]" But this doesn't work. Has anyone an idea if this is possible. I know it is with a "normal" pivot table but is it also possible with a pivot table based on an olap cube? Thx, for your answers |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Olap Cubes - Automatic Select
Use the & operator to incorporate the variable, e.g.:
ActiveSheet.PivotTables("Pivottable1").PivotFields ("[MKT]") _ .CurrentPageName = "[MKT].[All].[" & LTemp & "]" Agamemnon wrote: Hi, I would like to select a value in a pivot field automatically from information on a list box. My pivot table is built on an Olap Cube. I already have the following code for changing the pivot: ActiveSheet.PivotTables("Pivottable1").PivotFields ("[MKT]").CurrentPageName = _ "[MKT].[All].[NEW YORK]" Now I want the value chosen in the listbox to be used as a variable LTemp = CurList.List(CurList.ListIndex) ActiveSheet.PivotTables("Pivottable1").PivotFields ("[MKT]").CurrentPageName = _ "[MKT].[All].[LTemp]" But this doesn't work. Has anyone an idea if this is possible. I know it is with a "normal" pivot table but is it also possible with a pivot table based on an olap cube? Thx, for your answers -- Debra Dalgleish Excel FAQ, Tips & Book List http://www.contextures.com/tiptech.html |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Error Updating OLAP Cubes | Excel Discussion (Misc queries) | |||
GetPivotData and SQL Server OLAP cubes | Excel Discussion (Misc queries) | |||
OLAP Cubes | Excel Discussion (Misc queries) | |||
pivottable and OLAP cubes | Excel Worksheet Functions | |||
OLAP Cubes | Excel Programming |