Trendline.Type property (Word)

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

Syntax

expression.Type

expression A variable that represents a 'Trendline' object.

Example

The following example changes the trendline type for the first series of the first chart in the active document. If the series has no trendline, this example fails.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 .Chart.SeriesCollection(1).Trendlines(1).Type = xlMovingAvg 
 End If 
End With

See also

Trendline Object

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.