Expand Minimize

CONTAINERSHEETREF Function

Last modified: June 17, 2011

Applies to: Office 2013 | Visio 2013

In this article
Version Information
Syntax
Remarks
Example

Returns a sheet reference to the specified container that contains the shape.

Version Added: Visio 2010

CONTAINERSHEETREF(index[, category])

Parameters

Name

Required/Optional

Data Type

Description

index

Required

Integer

The 1-based index of the container. See Remarks for more information.

category

Optional

String

The category of the container. See Remarks for more information.

Return Value

ShapeSheet reference

The index of a container is calculated based on the z-order of containers from front to back.

Categories are user-defined strings that you can use to categorize shapes. You can define categories in the User.msvShapeCategories cell in the ShapeSheet for a shape. You can define multiple categories for a shape by separating the categories with semi-colons.

If the shape is not a member of a container, or if there is no container that matches both the specified index number and the category, CONTAINERSHEETREF returns #REF!.

CONTAINERSHEETREF(1)!Height

Returns the value in the Height cell of the container that is most forward on the page to which the shape belongs.

Show:
© 2014 Microsoft