API Documentation > CorelDRAW > 2025-v26 > Shape > IVGShape
Shape.Layer property
Returns or sets the layer that the shape resides upon
Syntax:
Property Get Layer() As Layer
Property Set Layer(ByVal Value As Layer)
Remarks:
The Layer property returns or specifies the document layer on which the active shape resides.
Examples:
The following VBA example moves all rectangles to a separate layer.
Sub Test()
Dim s As Shape
Dim lr As Layer
Set lr = ActivePage.CreateLayer("Rectangles")
For Each s In ActivePage.FindShapes(Type:=cdrRectangleShape)
  s.Layer = lr
Next s 
End Sub