Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Retrieve Value from a PageField

I have a pivot table in Excel based on an OLAP cube. I need to cycle
through the rows, columns and page fields to determine what (if
anything) the user has selected.

I've successfully done this for rows and columns but not for page
fields. I'm using the following code:
PT.PageFields(i).CurrentPageName (PT is a PivotTable object)

This returns the following:
[Category].[All Category].[Books]

I only want to return "Books". Aside from parsing it out, is there a
way to return only that portion of the page field name?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,163
Default Retrieve Value from a PageField

Don't know if you can get only the last part with any property of the
PivotTable, but parsing out would be easy:

PageSelected = PT.PageFields(i).CurrentPageName
PageSelected = Right(PageSelected,
Len(PageSelected)-InStrRev(PageSelected,"."))

"kf" wrote:

I have a pivot table in Excel based on an OLAP cube. I need to cycle
through the rows, columns and page fields to determine what (if
anything) the user has selected.

I've successfully done this for rows and columns but not for page
fields. I'm using the following code:
PT.PageFields(i).CurrentPageName (PT is a PivotTable object)

This returns the following:
[Category].[All Category].[Books]

I only want to return "Books". Aside from parsing it out, is there a
way to return only that portion of the page field name?


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
About PageField (cont't) Polly[_3_] Excel Programming 0 June 4th 04 02:42 AM
About PageField Polly[_3_] Excel Programming 6 June 3rd 04 05:46 PM
Pivot Table PageField Todd Huttenstine Excel Programming 4 April 21st 04 09:46 PM
Finding the name of the pagefield clicked Tama Excel Programming 0 December 23rd 03 04:23 AM
Members in a PageField Rickard Excel Programming 1 October 14th 03 03:08 PM


All times are GMT +1. The time now is 11:36 PM.

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"