Shape.Parent property (Visio)

Determines the parent of a Shape object. Read/write.

Syntax

expression.Parent

expression A variable that represents a Shape object.

Return value

Object

Remarks

In general, an object's parent is the object that contains it. If a Shape object is a member of a group, the parent is that group. Otherwise, its parent is a Page or a Master object.

When assigning a new parent shape, you must assign a Shape object. If you want to assign a page or master to be the parent of a shape, you must assign the Shape object returned by the Page or Master object's PageSheet property.

A shape and its parent shape must be in the same containing page or containing master. If the new parent is not a Shape object, or if the ContainingPage or ContainingMaster property of the parent shape is different from that of the shape, Microsoft Visio raises an exception.

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.