pivot source change

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?
 
T

Tim Williams

Try running the update from another workbook and save/close/re-open the
pivot table workbook after every 10 sheets or so.

Tim
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top