Any way to enable the 2007 pivot table option Defer Layout Update with VBA?

G

GollyJer

I'd really like to do the following to try and speed things up a little.

With .PivotTables("MyPivotTable")
'.DeferLayoutUpdate = True

.PivotFields("Field1").Orientation = xlRowField
.PivotFields("Field2").Orientation = xlColumnField
.AddDataField .PivotFields("Field3"), "", xlSum

'.DeferLayoutUpdate = False
End With

I'm currently turning screen updating off but am hoping that deferring
layout update might speed things up a little as well.

Thanks,
Jeremy
 
G

GollyJer

Figured it out. Looking through the object model is actually worth while
some times. :p

With Sheet1.PivotTables("MyPivotTable")
.ManualUpdate= True

.PivotFields("Field1").Orientation = xlRowField
.PivotFields("Field2").Orientation = xlColumnField
.AddDataField .PivotFields("Field3"), "", xlSum

.ManualUpdate= False
End With
 

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