Layer property

Layer property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

See also         Example         Applies to

Returns the layer to which a shape is assigned.

Version added

4.0

Syntax

        
          objRet = object.Layer(index)
      

objRet

A Layer object that represents the requested layer.

object

Required. An expression that returns a Shape object.

index

Integer. The ordinal of the layer to get.

Remarks

If a shape is assigned to three layers, then the valid indexes that can be passed to its Layer property are 1 through 3.

To get the number of layers to which a shape is assigned, use the LayerCount property.