PC Review


Reply
Thread Tools Rate Thread

How to add a trendline to a series in Excel using vb.net

 
 
Sandeep
Guest
Posts: n/a
 
      27th Apr 2004
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


 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      27th Apr 2004
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
>
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Trendline and multiple data series =?Utf-8?B?QmxhY2tjYXQ=?= Microsoft Excel Misc 1 2nd May 2005 02:06 AM
How do I get a trendline for all data series, instead of just one. =?Utf-8?B?RGF2ZSBEYXJsaW5n?= Microsoft Excel Charting 1 15th Dec 2004 02:03 AM
Trendline of multiple series geooil Microsoft Excel Charting 1 19th Nov 2004 06:25 AM
Trendline of multiple series geooil Microsoft Excel Charting 2 16th Nov 2004 12:45 PM
Re: trendline for multiple series Jon Peltier Microsoft Excel Charting 0 8th Oct 2003 05:49 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:39 AM.