Share via


Shapes.AddLine Method

Returns a Shape object that represents the new line in a worksheet.

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

Syntax

'Declaration
Function AddLine ( _
    BeginX As Single, _
    BeginY As Single, _
    EndX As Single, _
    EndY As Single _
) As Shape
'Usage
Dim instance As Shapes
Dim BeginX As Single
Dim BeginY As Single
Dim EndX As Single
Dim EndY As Single
Dim returnValue As Shape

returnValue = instance.AddLine(BeginX, _
    BeginY, EndX, EndY)
Shape AddLine(
    float BeginX,
    float BeginY,
    float EndX,
    float EndY
)

Parameters

  • BeginX
    Type: System.Single

    Required Single. The position (in points) of the line's starting point relative to the upper-left corner of the document.

  • BeginY
    Type: System.Single

    Required Single. The position (in points) of the line's starting point relative to the upper-left corner of the document.

  • EndX
    Type: System.Single

    Required Single. The position (in points) of the line's end point relative to the upper-left corner of the document.

  • EndY
    Type: System.Single

    Required Single. The position (in points) of the line's end point relative to the upper-left corner of the document.

Return Value

Type: Microsoft.Office.Interop.Excel.Shape

See Also

Reference

Shapes Interface

Shapes Members

Microsoft.Office.Interop.Excel Namespace