Partager via


Style.HorizontalAlignment Property

Returns or sets the horizontal alignment for the specified object.

Namespace:  Microsoft.Office.Interop.Excel
Assembly:  Microsoft.Office.Interop.Excel (in Microsoft.Office.Interop.Excel.dll)

Syntax

'Declaration
Property HorizontalAlignment As XlHAlign
    Get
    Set
'Usage
Dim instance As Style
Dim value As XlHAlign

value = instance.HorizontalAlignment

instance.HorizontalAlignment = value
XlHAlign HorizontalAlignment { get; set; }

Property Value

Type: Microsoft.Office.Interop.Excel.XlHAlign

Remarks

XlHAlign can be one of the following XlHAlign constants:

xlHAlignCenter

xlHAlignCenterAcrossSelection

xlHAlignDistributed

xlHAlignFill

xlHAlignGeneral

xlHAlignJustify

xlHAlignLeft

xlHAlignRight

Some of these constants may not be available to you, depending on the language support (U.S. English, for example) that you've selected or installed.

See Also

Reference

Style Interface

Style Members

Microsoft.Office.Interop.Excel Namespace