API Documentation > CorelDRAW > 2025-v26 > Rulers > IVGRulers
Rulers.HUnits property
Gets or sets the rulers horizontal unit
Syntax:
Property Get HUnits() As cdrUnit
Property Let HUnits(ByVal Value As cdrUnit)
Remarks:
The HUnits property returns or specifies the unit of measurement for the horizontal ruler in the document window. This property returns or specifies a value of cdrUnit. The specified value affects only the user interface of CorelDRAW and has no effect on automation. See also the Document.Unit property.
Examples:
The following VBA example changes the unit of measurement for the horizontal ruler to inches and for the vertical ruler to centimeters.
Sub Test()
With ActiveDocument.Rulers
  .HUnits = cdrInch
  .VUnits = cdrCentimeter
End With 
End Sub