Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default Cycling Through Page Fields

I have a routine that cycles through page fields in a pivot table using VB
code. For the most part, things work fine, but every now and then, I have an
item in my list that doesn't exist in the data generating the pivot table.
The code is generating some errors as a result, I think because it's
overwriting the previous item in the page field list with the one I'm trying
to look at.

Is there an error check step that would help me avoid this? I just want to
code to skip this item if it doesn't exist in the Pivot Table.

Thanks,
Todd

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,979
Default Cycling Through Page Fields

There's sample code here that will check for each item before changing
the page field:

http://www.contextures.com/xlPivot09.html

Under the heading 'Check for Pivot Items Before Printing'

T. Jenkins wrote:
I have a routine that cycles through page fields in a pivot table using VB
code. For the most part, things work fine, but every now and then, I have an
item in my list that doesn't exist in the data generating the pivot table.
The code is generating some errors as a result, I think because it's
overwriting the previous item in the page field list with the one I'm trying
to look at.

Is there an error check step that would help me avoid this? I just want to
code to skip this item if it doesn't exist in the Pivot Table.

Thanks,
Todd



--
Debra Dalgleish
Contextures
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
drop page fields here and drop series fields here Souris Charts and Charting in Excel 3 January 14th 08 02:38 PM
cycling through pivotchart page fields BorisS Excel Programming 0 September 30th 06 01:12 AM
Pivot Table Cycling Through Page Fields Automatically nrehman Excel Discussion (Misc queries) 14 October 13th 05 07:32 PM
Cycling through form fields Azza Excel Programming 2 October 12th 04 10:44 PM
How To: Page Fields Tom Ogilvy Excel Programming 0 July 12th 04 07:57 PM


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