Edit

Share via


Type property (Excel Graph)

The Type property as it applies to the following objects.

Axis object

Returns or sets the axis type. Read/write XlAxisType.

Syntax

expression.Type

expression Required. An expression that returns an Axis object.

ChartColorFormat object

Returns the color type. Read-only Long.

Syntax

expression.Type

expression Required. An expression that returns a ChartColorFormat object.

ChartFillFormat object

Returns the fill type. Read-only MsoFillType.

Syntax

expression.Type

expression Required. An expression that returns a ChartFillFormat object.

DataLabel and DataLabels objects

Returns or sets the data label type. Read/write Variant.

Syntax

expression.Type

expression Required. An expression that returns a DataLabel object or DataLabels collection.

Series object

Returns or sets the series type. Read/write Long.

Syntax

expression.Type

expression Required. An expression that returns a Series object.

Trendline object

Returns or sets the trendline type. Read/write XlTrendlineType.

Syntax

expression.Type

expression Required. An expression that returns a Trendline object.

Example

This example changes the trendline type for the first series in the chart. If the series has no trendline, this example fails.

myChart.SeriesCollection(1).Trendlines(1).Type = xlMovingAvg

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.