API Documentation > CorelDRAW > 2025-v26 > ShapeRange > IVGShapeRange
ShapeRange.RemoveAll method
Removes All shapes form the range
Syntax:
Sub RemoveAll()
Remarks:
The RemoveAll method removes all shapes from a specified shape range. The specified shapes are removed only from the specified shape range and not from any other ranges of which they may be a part. The specified shapes are not deleted from the document.
Examples:
The following VBA example creates ten circles and randomly places them on a page. It fills them with red and groups them. It then creates 10 more rectangles, fills them with yellow, and groups them.
Sub Test()
Dim sr As New ShapeRange
Dim n As Long
For n = 1 To 10
  sr.Add ActiveLayer.CreateEllipse2(Rnd() * 8, Rnd() * 11, 0.5)
Next n
sr.ApplyUniformFill CreateRGBColor(255, 0, 0)
sr.Group
sr.RemoveAll
For n = 1 To 10
  sr.Add ActiveLayer.CreateRectangle2(Rnd() * 8, Rnd() * 11, 1, 1)
Next n
sr.ApplyUniformFill CreateRGBColor(255, 255, 0)
sr.Group 
End Sub