LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
RestlessAde
 
Posts: n/a
Default VB Corrupting Pivot Tables

Hi,

I have found that using the following code I am able to corrupt the data in
my pivot table:

On Error Resume Next
ActiveSheet.PivotTables("PTMonthlyAnalystSalesPA") .PivotFields("PA").CurrentPage = ActiveSheet.Range("B1").Value
If Err Then
ActiveSheet.PivotTables("PTMonthlyAnalystSalesPA") .PivotFields("PA").CurrentPage = "(blank)"

What I have found is that values in the PA page field are changed, even
though the actual data source has not. For example, my list used to contain
the name "Alex", but this is replaced with "Steve". In the data source
"Steve" is not referenced in the SA column. If I select Steve, it pulls the
data for Alex!

If you refresh this doesn't make a difference. If you replace the pivot
table with an identical table it returns to normal, until I start running
this code again.

Has anyone encountered this problem and can advise how I can avoid this?

Thanks,
Ra
 
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
overlapping pivot tables cwinters Excel Discussion (Misc queries) 2 July 4th 06 05:02 PM
Blank Cells in Pivot Tables Greg Excel Discussion (Misc queries) 1 March 16th 05 09:23 PM
Macro for Pivot Tables Thomas Excel Discussion (Misc queries) 1 March 15th 05 01:03 AM
Product Function in Pivot Tables from Multiple Consolidation Range bbishop222 Excel Worksheet Functions 0 February 22nd 05 04:55 PM
How does the term 'pivot' apply to Excel's Pivot tables and Pivot. stvermont Excel Discussion (Misc queries) 1 February 17th 05 01:34 AM


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