ContainerProperties.RemoveMember method (Visio)

Removes a shape or set of shapes from the container.

Syntax

expression.RemoveMember (ObjectToRemove)

expression A variable that represents a ContainerProperties object.

Parameters

Name Required/Optional Data type Description
ObjectToRemove Required [UNKNOWN] The shape or shapes to remove from the container. Can be a Shape or Selection selection.

Return value

Nothing

Remarks

The RemoveMember method removes from the container the shapes specified in the ObjectToRemove parameter.

If the container is a list, Microsoft Visio removes the shapes specified in ObjectToRemove both from the list (if it is a list member) and from the list container.

If the ContainerProperties.LockMembership property is True, Visio returns a Disabled error.

If ObjectToRemove does not contain top-level shapes on the page, Visio returns an Invalid Parameter error. However, if ObjectToRemove is not a container member, Visio does not return an error.

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.