LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Change Pivot Field Value

When i run into this problem I use something like

dim itm as PivotItem
With ActiveSheet.PivotTables("Report").PivotFields("Yea r")
for each itm in .PivotItems
if itm.Value = "2006" then
.CurrentPage = itm.Value
exit for
end if
Next
End With

This is pseudo code and may need some refinement, but the concept of looping
throught he pivot items has been successful for me. It also avoids trying to
assign a value that doesn't exist and can screw up your table.

--
Regards,
Tom Ogilvy





"Des" wrote:


Thanks Tom. Unfortunately same error when run as a single line of code
separately, removing quotes doesn't help either.

Regards.


--
Des
------------------------------------------------------------------------
Des's Profile: http://www.excelforum.com/member.php...o&userid=34154
View this thread: http://www.excelforum.com/showthread...hreadid=542429


 
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
Change the name of the Data field in a Pivot Table John Excel Discussion (Misc queries) 2 October 6th 08 05:16 PM
Change Field On Pivot Table Using VBA Input Box Cue Excel Discussion (Misc queries) 0 July 4th 08 06:51 PM
Unable to change field settings in calculated field in a pivot tab Mike Excel Discussion (Misc queries) 0 September 25th 06 07:45 PM
change 'count of' to 'sum of' in pivot table field Rob B Excel Discussion (Misc queries) 2 July 28th 06 10:03 AM
Permanent change of Field Settings in Pivot Table Sue Sch Excel Discussion (Misc queries) 1 July 21st 06 05:05 AM


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

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

About Us

"It's about Microsoft Excel"