Sandeep -
I don't know yet how to do the VB.Net end of it. But a Series has a
Trendlines collection, provided there are any trendlines at all. To add
a trendline in VBA you'd say
ActiveChart.Seriescollection(1).Trendlines.Add [parameter list]
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
Sandeep wrote:
> Hi,
>
> I am trying to do charting in Excel using vb.net.
> There, I am not able to access the Trendlines collection
> of a series.
>
> dim aSeries as Excel.Series
> aSeries = CType(Excel.SeriesCollection(0), Excel.Series)
>
> ### Actually Excel says that Series should have a
> Trenlines as collection and to that I can add a trendline.
>
> But aSeries object obtained above does not have a
> Trendlines collection.
>
> Help, how to add a new trendline to the collection of
> trendlines of a series.
>
>
> Thx
> Sandeep
>
>