Trendline.Type Property

Excel Developer Reference

Returns or sets a XlTrendlineType value that represents the trendline type.

Syntax

expression.Type

expression   A variable that represents a Trendline object.

Example

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

Visual Basic for Applications
  Worksheets(1).ChartObjects(1).Chart _
    .SeriesCollection(1).Trendlines(1).Type = xlMovingAvg

See Also