API Documentation > CorelDRAW > 2025-v26 > SubPath > IVGSubPath
SubPath.Closed property
Gets or sets whether the subpath is open or closed
Syntax:
Property Get Closed() As Boolean
Property Let Closed(ByVal Value As Boolean)
Remarks:
The Closed property returns or specifies whether a curve's subpath is open or closed. If this property is set to True, the subpath is closed, and an enclosure is formed by connecting the path's starting and ending points.
Examples:
The following VBA example closes all subpaths in the selected curve.
Sub Test()
Dim spath As SubPath
For Each spath In ActiveShape.Curve.Subpaths
  spath.Closed = True
Next spath 
End Sub