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 - 30 May 2008 04:47 GMT
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'
> 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
[quoted text clipped - 8 lines]
> Thanks,
> Todd

Signature
Debra Dalgleish
Contextures
http://www.contextures.com/tiptech.html