basically, you're better off using worksheet functions
rather than the chart text string.
Use this format:
slope= application.worksheetfunction.slope(range
("a1:a50"),range("b1:b50"))
I wrote some killer code to automate the whole process.
try this url for the other trendline syntaxes-
http://www.j-walk.com/ss/excel/tips/tip101.htm
-----Original Message-----
All VBA Kung foo masters, I need to be able to use the
Equation of a line in my code to calculate a forecast on
some sales data. I know that on the Chart I can add a
trendline, and then tell it to 'display equation on
chart', but how can I get the value of that equation?
I actually want to use that equation in some code and
since Excel is displaying it there should be a way to get
the value of that data label
I tried this but to no avail:
ActiveChart.SeriesCollection(1).Trendlines
(1).DataLabel.Value????
Any one got the Kung Foo move for this?
Alex A
.