ChartObjects.Add Method

Creates a new embedded chart. Returns a ChartObject object.

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

Syntax

'Declaration
Function Add ( _
    Left As Double, _
    Top As Double, _
    Width As Double, _
    Height As Double _
) As ChartObject
'Usage
Dim instance As ChartObjects
Dim Left As Double
Dim Top As Double
Dim Width As Double
Dim Height As Double
Dim returnValue As ChartObject

returnValue = instance.Add(Left, Top, Width, _
    Height)
ChartObject Add(
    double Left,
    double Top,
    double Width,
    double Height
)

Parameters

  • Left
    Type: System.Double

    Required Double. The initial coordinates of the new object (in points), relative to the upper-left corner of cell A1 on a worksheet or to the upper-left corner of a chart.

  • Top
    Type: System.Double

    Required Double. The initial coordinates of the new object (in points), relative to the upper-left corner of cell A1 on a worksheet or to the upper-left corner of a chart.

  • Width
    Type: System.Double

    Required Double. The initial size of the new object in points.

  • Height
    Type: System.Double

    Required Double. The initial size of the new object in points.

Return Value

Type: Microsoft.Office.Interop.Excel.ChartObject

See Also

Reference

ChartObjects Interface

ChartObjects Members

Microsoft.Office.Interop.Excel Namespace