Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Change the name of the Data field in a Pivot Table | Excel Discussion (Misc queries) | |||
Change Field On Pivot Table Using VBA Input Box | Excel Discussion (Misc queries) | |||
Unable to change field settings in calculated field in a pivot tab | Excel Discussion (Misc queries) | |||
change 'count of' to 'sum of' in pivot table field | Excel Discussion (Misc queries) | |||
Permanent change of Field Settings in Pivot Table | Excel Discussion (Misc queries) |