Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Updating OLAP Cubes OLAP user Excel Discussion (Misc queries) 0 April 10th 08 03:23 AM
GetPivotData and SQL Server OLAP cubes GetPivotMe Excel Discussion (Misc queries) 0 April 19th 07 05:34 PM
OLAP Cubes Steven Cheng Excel Discussion (Misc queries) 1 September 16th 05 05:46 AM
pivottable and OLAP cubes willcob Excel Worksheet Functions 0 May 25th 05 11:57 AM
OLAP Cubes tstillwell Excel Programming 0 October 6th 03 08:43 PM


All times are GMT +1. The time now is 05:00 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"