LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Automatically Update a Pivot Table Field Used as Column / Row

I have written code which updates several pivot table page fields using a
list. Is there a way to also update a pivot table field when it's used in a
pivot table as a column/row? I tried the code below, however, I get an error
stating that the 'Object doesn't support this property or method'. The only
other option I could think of was to create a second field in the data sheet
which would contain the same data then use this new field as a page field in
the pivot table but I would like to know if there is a way to do this using
VBA.

Sheets("Pivot Tables").Select

ActiveSheet.PivotTables("PivotTable2").PivotItems( "Product
Line").CurrentPage = Sheets("Sales").Range("E3").Value
ActiveSheet.PivotTables("PivotTable2").PivotItems( "Region").CurrentPage =
Sheets("Sales").Range("B3").Value

--
RDiva
 
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
automatically update the pivot table eva cheng Excel Discussion (Misc queries) 3 May 25th 10 11:53 AM
Pivot table does not automatically update when underlying data cha PFB New Users to Excel 4 December 29th 08 03:05 PM
Automatically Hide Pivot Table Field List Box RB Excel Discussion (Misc queries) 1 May 28th 07 12:21 PM
Pivot Table update automatically? shital shah Excel Programming 1 February 26th 05 09:31 PM
Update Data Field in Pivot Table with Dynamic Excel Range ExcelMonkey[_97_] Excel Programming 1 March 3rd 04 08:16 PM


All times are GMT +1. The time now is 07:35 AM.

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"