Font.Underline Property (Excel)

Returns or sets the type of underline applied to the font. Can be one of the following XlUnderlineStyle constants. Read/write Variant .

Syntax

expression. Underline

expression A variable that represents a [Font](./Excel.Font(Graph property).md) object.

Remarks

XlUnderlineStyle can be one of these XlUnderlineStyle constants.
xlUnderlineStyleSingle
xlUnderlineStyleDouble
xlUnderlineStyleSingleAccounting
xlUnderlineStyleDoubleAccounting

Example

This example sets the font in the active cell on Sheet1 to single underline.

Worksheets("Sheet1").Activate 
ActiveCell.Font.Underline = xlUnderlineStyleSingle

See also

Font Object