Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Macro and Pivot tables using a CUBE as data source

I'm using several pivot tables all driven from the same Cube. All tables are
using the same field to filter on [MAJOR TERMINAL CODE-NAME]. The task is to
create a macro that will read the first filter, then copy that value to the
other tables. Problem, the Cube field [MAJOR TERMINAL CODE-NAME] contains
two columns, (one text, one numeric), but only one is visible. When
recording the field with mouse clicks it clearly captures the two values in
the macro code. However, when I try to use ActiveCell.PivotCell.Range.Value
only the first column gets captured to my variable. Here is my code:
pivotchoice = ActiveCell.PivotCell.Range.Value
pivotcode = "[BOOKING AGENCY].[BOOKING AGENCY-MAJOR].&[" & pivotchoice &
"]"
ActiveSheet.PivotTables("Agent Total").PivotFields( _
"[BOOKING AGENCY].[BOOKING AGENCY-MAJOR].[MAJOR TERMINAL
CODE-NAME]"). _
CurrentPageName = pivotcode

Any idea how to capture both columns to the variable pivotchoice

--
Ken
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
Pivot tables - Editing the data source shared by multiple pivot ta sankat Excel Discussion (Misc queries) 1 April 22nd 10 03:05 PM
Data Source in Pivot Tables Pam Charts and Charting in Excel 5 September 26th 08 07:13 PM
Identifying Source Data for Pivot Tables kleivakat Excel Discussion (Misc queries) 2 December 19th 07 03:54 PM
Source Data in Pivot Tables cqc Excel Worksheet Functions 7 August 2nd 07 01:34 PM
Pivot Table data source "data source contains no visible tables" Jane Excel Worksheet Functions 0 September 29th 05 08:28 PM


All times are GMT +1. The time now is 03:54 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"