pivottable.ManualUpdate [= ]
True RefreshTable, ,
False RefreshTable .
- False.
reset False ()
true , (, Visible)
, :
For i = 1 To oPivotField.PivotItems.Count
If (oPivotField.PivotItems(i).Name = "TestCondition") Then
oPivotField.Parent.ManualUpdate = True
oPivotField.PivotItems(i).Visible = True 'doesn't recalculate pivot table because ManualUpdate is set to True
Else
oPivotField.Parent.ManualUpdate = True
oPivotField.PivotItems(i).Visible = False 'doesn't recalculate pivot table because ManualUpdate is set to True
End If
Next
'setting pivot table ManualUpdate property to False might be redundant at this point because it gets reset to false immediately after you set Visible property of oPivotField
oPivotField.Parent.ManualUpdate = False
oPivotField.Parent.Update()
, ManualUpdate ( , reset false, true, )
, Excel, :
Pivot Refresh vs. Update - ?
:
: Excel VBA .NET
: ,
ISBN: 978-0-596-00766-9 | ISBN 10: 0-596-00766-3
Ebook ISBN: 978-0-596-15951-1 | ISBN 10: 0-596-15951-X