API Documentation > CorelDRAW > 2025-v26 > ShapeRange > IVGShapeRange
ShapeRange.Rotate method
Rotates the shape by adding the amount to the current rotation value
Syntax:
Sub Rotate(ByVal Angle As Double)
Parameters:
Name Type Description
Angle
Double
Remarks:
The Rotate method rotates all of shapes in a shape range, treating the group as a single object. The center of rotation is specified by the RotationCenterX and RotationCenterY properties, while RotateEx allows specifies the center of rotation directly.
Examples:
The following VBA example creates a "flower" by duplicating circles. It then creates a larger flower by duplicating this group of six circles five more times to form six petals of different colors.
Sub Test()
Dim n As Long
Dim sr As New ShapeRange, sr1 As ShapeRange
Dim s As Shape
Set s = ActiveLayer.CreateEllipse2(0, 0, 0.5)
s.SetRotationCenter 1, 1
For n = 1 To 5
  sr.Add s.Duplicate
  s.Rotate 60
Next n
sr.Add s
sr.ApplyUniformFill CreateRGBColor(255, 0, 0)
sr.SetRotationCenter ActivePage.SizeWidth / 2, ActivePage.SizeHeight / 2
For n = 0 To 4
  Set sr1 = sr.Duplicate
  sr1.ApplyUniformFill CreateRGBColor(255, 255 * (1 - n / 5), 0)
  sr.Rotate 60
Next n 
End Sub