API Documentation > CorelDRAW > 2025-v26 > ShapeRange > IVGShapeRange
ShapeRange.OrderToBack method
Arranges the shape's stacking order by moving it to the back
Syntax:
Sub OrderToBack()
Remarks:
The OrderToBack method moves a shape range to the back of the stacking order of the current layer.
Examples:
The following VBA example creates four rectangles and places them in front of all the other shapes of the current layer.
Sub Test()
Dim s As Shape, sr As New ShapeRange
Dim w As Double, h As Double
Dim c1 As New Color, c2 As New Color
w = ActivePage.SizeWidth / 2
h = ActivePage.SizeHeight / 2
c1.RGBAssign 255, 0, 0
c2.RGBAssign 255, 255, 255
Set s = ActiveLayer.CreateRectangle2(0, 0, w, h)
s.Fill.ApplyFountainFill c1, c2, , 45
sr.Add s
Set s = ActiveLayer.CreateRectangle2(w, 0, w, h)
s.Fill.ApplyFountainFill c1, c2, , 135
sr.Add s
Set s = ActiveLayer.CreateRectangle2(0, h, w, h)
s.Fill.ApplyFountainFill c1, c2, , -45
sr.Add s
Set s = ActiveLayer.CreateRectangle2(w, h, w, h)
s.Fill.ApplyFountainFill c1, c2, , -135
sr.Add s
sr.OrderToBack 
End Sub