InvisibleApp.DeferRecalc Property
Visio Automation Reference |
Determines whether the application recalculates cell formulas during a series of actions. Read/write.
Version Information
Version Added: Visio 4.1
Syntax
expression.DeferRecalc
expression A variable that represents an InvisibleApp object.
Return Value
Integer
Remarks
Use the DeferRecalc property to improve performance during a series of actions. For example, you can defer formula recalculation while changing the formulas or values of several cells. When the series of actions is complete, you must always set the DeferRecalc property back to the value it had before you changed it. See the following examples.
If you release objects or send a large number of commands to Visio while recalculation is deferred, Visio may at times need to process its queue of pending recalculations. Because of this, use care in setting formulas inside a scope where you want recalculation deferred. Ideally, you should only set formulas when recalculation is turned off.
For example, consider the following Microsoft Visual Basic for Applications (VBA) sequence:
Visual Basic for Applications |
---|
|
Because VBA makes and releases a temporary Cell object in the preceding code, Visio will process its queue at that point.
In the following sequence, Visio will not process the recalculation queue until the application turns recalculation on again (or the user performs some operation).
Visual Basic for Applications |
---|
|
See Also