Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

GUARD Function

Published: July 16, 2012

Protects expression from deletion and change by actions performed in the drawing window, for example, moving, sizing, grouping, or ungrouping shapes.





Data Type





A combination of constants, operators, functions, and references to ShapeSheet cells that results in a value.

The cells most often affected by the GUARD function are Width, Height, PinX, and PinY.

Guarding a formula in any cell prevents that cell's value from being changed by actions in the drawing window. However, one action in the drawing window can affect several cells, and each of these cells must be guarded if you want to prevent unexpected changes to the shape's appearance.

GUARD(TEXTWIDTH(TheText) + 0.5 in)

This expression in the Width cell of a shape's Shape Transform section prevents the expression (TEXTWIDTH(TheText) + 0.5 in) from being replaced with another value when the shape's width is changed in the drawing window. TheText is a cell that gets triggered when the associated shape's text composition changes.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft. All rights reserved.