R
Reinfried Englmair
I use to add trendline:
Sub AddTrendline()
Dim serSeries1
' Set a variable to the first series in the first
' chart of cspace.
Set serSeries1 = cspace.Charts(0).SeriesCollection(0)
' Add a trendline to the series.
serSeries1.Trendlines.Add
' Hide the R Squared value for the trendline.
serSeries1.Trendlines(0).IsDisplayingRSquared = False
serSeries1.Trendlines(0).IsDisplayingEquation = False
' color of trendline is RED
serSeries1.Trendlines(0).Line.color = vbRed
serSeries1.Trendlines(0).Type = 1
serSeries1.Trendlines(0).DataLabel.Font.Bold = True
End Sub
You can delete the trendline with:
serSeries1.Trendlines.Delete 0
Sub AddTrendline()
Dim serSeries1
' Set a variable to the first series in the first
' chart of cspace.
Set serSeries1 = cspace.Charts(0).SeriesCollection(0)
' Add a trendline to the series.
serSeries1.Trendlines.Add
' Hide the R Squared value for the trendline.
serSeries1.Trendlines(0).IsDisplayingRSquared = False
serSeries1.Trendlines(0).IsDisplayingEquation = False
' color of trendline is RED
serSeries1.Trendlines(0).Line.color = vbRed
serSeries1.Trendlines(0).Type = 1
serSeries1.Trendlines(0).DataLabel.Font.Bold = True
End Sub
You can delete the trendline with:
serSeries1.Trendlines.Delete 0