How to switch off calculation on pivot tables.

W

witek

As above.


There is a code:

For i = 1 To iDataCols / 2
With
ActiveSheet.PivotTables(sDatabase1Name).PivotFields(FieldNames(i))
.Orientation = xlDataField
.Caption = "Sum of " & FieldNames(i)
.Position = i
.Function = xlSum
End With
Next i

Every iteration needs more and more time, because pivot table is
recalculated in each iteration.

Is there any way to switch it off similar to Application.Calculation =
xlCalculationmanual.

Application.Calculation does not work on pivot tables.
Thanks
 
D

Debra Dalgleish

You could turn on manual update:

ActiveSheet.PivotTables(1).ManualUpdate = True
 

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