API Documentation > CorelDRAW > 2025-v26 > Curve > IVGCurve
Curve.Closed property
Gets or sets whether the curve is closed
Syntax:
Property Get Closed() As Boolean
Property Let Closed(ByVal Value As Boolean)
Remarks:
The Closed property returns or specifies the value of a curve object's closed status. Curves are closed if all of its subpaths are closed. Assigning a value to this property opens or closes the curve (all subpaths).
Examples:
The following VBA example selects an object in the active document and determines if the object is a curve object. If the selection is a curve, it changes its Closed status to True, joining all of the segments in the shape to make a self-contained object. A color fountain fill is then applied to the new closed curve object using the Application.CreateColorEx method.
Sub CurveClosed()
Dim s As Shape
Set s = ActiveSelection.Shapes(1)
If s.Type = cdrCurveShape Then
  s.Curve.Closed = True
End If
s.Fill.ApplyFountainFill CreateColorEx(5005, 255, 0, 0), _
  CreateColorEx(5005, 0, 0, 0), 1 
End Sub