Description
Represents an embedded chart on a sheet. The ChartObject object acts as a container for a Chart object. Properties and methods for the ChartObject object control the appearance and size of the embedded chart on the sheet.
Accessors
The ChartObject object is a member of the ChartObjects collection. The ChartObjects collection contains all the embedded charts on a single sheet. Use the Add method to create a new empty embedded chart and add it to the collection. Use the ChartWizard method to add data and format the new empty chart. Use the Chart property to access the embedded chart contained in the ChartObject object.
To access a single member of the collection, use the ChartObjects method with the index number or name of the embedded chart as an argument.
The following example sets the pattern for the chart area in embedded chart one on the worksheet named "Sheet1."
Worksheets("Sheet1").ChartObjects(1).Chart. _ ChartArea.Interior.Pattern = xlLightDown
The embedded chart name is shown in the Name Box when the embedded chart is selected. Use the Name property to set or return the name of the ChartObject object. The following example puts rounded corners on the embedded chart named "Chart 1" on the worksheet named "Sheet1."
Worksheets("sheet1").ChartObjects("chart 1").RoundedCorners = True
Properties
Application Property, Border Property, BottomRightCell Property, Chart Property, Creator Property, Enabled Property, Height Property, Index Property, Interior Property, Left Property, Locked Property, Name Property, OnAction Property, Parent Property, Placement Property, PrintObject Property, RoundedCorners Property, Shadow Property, Top Property, TopLeftCell Property, Visible Property, Width Property, ZOrder Property.
Methods
Activate Method, BringToFront Method, Copy Method, CopyPicture Method, Cut Method, Delete Method, Duplicate Method, Select Method, SendToBack Method.