Using VBA to create and format Chart
Nigel -
thank you for the reply it will take me some time to digest your code
example.
With respect to trendlines, and for XY scatter plots, is it a matter of
using a series based method, or some other method to modify this attributes.
When used the macro recorder the following code was generated
ActiveChart.SeriesCollection(1).Trendlines.Add(Typ e:=xlExponential, Forward _
:=0, Backward:=0, DisplayEquation:=False,
DisplayRSquared:=False).Select
I would have like to some how implement the following
With .SeriesCollection.NewSeries
.Values = "=" & sY_data_range
.XValues = "=" & sX_data_range
.Name = "Data"
.LineStyle = xlNone
.Trendlines.Add(Type:=xlExponential)
End With
this however does not work, and errors are generated by .LineStyle and
..Trendlines.Add method calls.
|