1 out of 10 rated this helpful - Rate this topic

Charts.Add Method (Excel)

Office 2010

Creates a new chart sheet and returns a Chart object.

expression .Add(Before, After, Count, Type)

expression A variable that represents a Charts object.

Parameters

Name

Required/Optional

Data Type

Description

Before

Optional

Variant

An object that specifies the sheet before which the new sheet is added.

After

Optional

Variant

An object that specifies the sheet after which the new sheet is added.

Count

Optional

Variant

The number of sheets to be added. The default value is one.

Count

Optional

Variant

An XlChartType constant that represents the type of chart to be added.

Return Value

A Chart object that represents the new chart sheet.

If Before and After are both omitted, the new chart is inserted before the active sheet.

This example creates an empty chart sheet and inserts it before the last worksheet.

ActiveWorkbook.Charts.Add Before:=Worksheets(Worksheets.Count)

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.