Type Property

Applies To

Axis object, ChartColorFormat object, ChartFillFormat object, DataLabel object, DataLabels collection object, Series object, Trendline object.

Description

Returns or sets the type of the specified object, as shown in the following table.

Object

Type

Axis

Axis type. Can be one of the following XlAxisType constants: xlCategory, xlSeriesAxis, or xlValue. Read/write Long.

ChartColorFormat

Color type. Can be one of the following MsoColorType constants: msoColorTypeMixed, msoColorTypeRGB, or msoColorTypeScheme. Read-only Long.

DataLabel, DataLabels

Data label type. Can be one of the following XlDataLabelsType constants: xlDataLabelsShowBubbleSizes, xlDataLabelsShowLabel, xlDataLabelsShowLabelAndPercent, xlDataLabelsShowNone, xlDataLabelsShowPercent, or xlDataLabelsShowValue. Read/write Long.

ChartFillFormat

Fill type. Can be one of the following MsoFillType constants: msoFillBackground, msoFillGradient, msoFillMixed, msoFillPatterned, msoFillPicture, msoFillSolid, or msoFillTextured. Read-only Long.

Trendline

Trendline type. Can be one of the following XlTrendlineType constants: xlExponential, xlLinear, xlLogarithmic, xlMovingAvg, xlPolynomial, or xlPower. Read/write Long.


See Also

ChartType property.

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