Share via


Shapes.AddLabel Method

Creates a label. Returns a Shape object that represents the new label.

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

Syntax

'Declaration
Function AddLabel ( _
    Orientation As MsoTextOrientation, _
    Left As Single, _
    Top As Single, _
    Width As Single, _
    Height As Single _
) As Shape
'Usage
Dim instance As Shapes
Dim Orientation As MsoTextOrientation
Dim Left As Single
Dim Top As Single
Dim Width As Single
Dim Height As Single
Dim returnValue As Shape

returnValue = instance.AddLabel(Orientation, _
    Left, Top, Width, Height)
Shape AddLabel(
    MsoTextOrientation Orientation,
    float Left,
    float Top,
    float Width,
    float Height
)

Parameters

  • Orientation
    Type: Microsoft.Office.Core.MsoTextOrientation

    Required MsoTextOrientation. The text orientation within the label. Can be one of these MsoTextOrientation constants:

    msoTextOrientationDownward

    msoTextOrientationHorizontal

    msoTextOrientationHorizontalRotatedFarEast

    msoTextOrientationMixed

    msoTextOrientationUpward

    msoTextOrientationVertical

    msoTextOrientationVerticalFarEast

    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.

  • Left
    Type: System.Single

    Required Single. The position (in points) of the upper-left corner of the label relative to the upper-left corner of the document.

  • Top
    Type: System.Single

    Required Single. The position (in points) of the upper-left corner of the label relative to the top corner of the document.

  • Width
    Type: System.Single

    Required Single. The width of the label, in points.

  • Height
    Type: System.Single

    Required Single. The height of the label, in points.

Return Value

Type: Microsoft.Office.Interop.Excel.Shape

See Also

Reference

Shapes Interface

Shapes Members

Microsoft.Office.Interop.Excel Namespace