pivot source change

  • Thread starter Thread starter snax500
  • Start date Start date
S

snax500

In Excel2000, I have afile with about 150 sheets that contain pivots.
I
need to change the source range in all the pivots to "Pivot_range". I
have the following
code:

Application.ScreenUpdating = False
Dim page
Dim pvt As PivotTable
For Each sht In Sheets
sht.Select
For Each pvt In ActiveSheet.PivotTables
pvt.SourceData = "pivot_range"


Next
Next
Application.ScreenUpdating = True


The problem is that I get not enough memory error after going through
50 sheets or so. I have 2 Gigs of RAM.I. Is there a way I can
fix this? Is there another way of programming a range source change?
 
Try running the update from another workbook and save/close/re-open the
pivot table workbook after every 10 sheets or so.

Tim
 
Back
Top