Share via


Underline Property

UnderlineStyleEnum

UnderlineStyleEnum can be one of these UnderlineStyleEnum constants.
owcUnderlineStyleDouble
owcUnderlineStyleDoubleAccounting
owcUnderlineStyleNone
owcUnderlineStyleSingle
owcUnderlineStyleSingleAccounting

expression.Underline

*expression   * Required. An expression that returns one of the objects in the Applies To list.

Example

This example adds a single underline to all cell values in row 1.

Sub FormatFont()

   Dim ssConstants

   Set ssConstants = Spreadsheet1.Constants

   Spreadsheet1.Rows(1).Font.Underline = ssConstants.owcUnderlineStyleSingle

End Sub

Applies to | ChFont Object | Font Object | PivotFont Object

See Also | Bold Property | Italic Property