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