Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default How to make a trendline invisible?

Hello,

I have several charts and several trendlines on them. How can I hide the
trendlines (make them invisible)from VB code?

Thanks in advance for the help,
Zoltan
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default How to make a trendline invisible?

I don't have code for you but if you make the trendline the same color as the
chart background and use the smallest weight it will seem "invisible." Just
an idea.
--
n00b lookn for a handout :)


"Zoltan" wrote:

Hello,

I have several charts and several trendlines on them. How can I hide the
trendlines (make them invisible)from VB code?

Thanks in advance for the help,
Zoltan

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default How to make a trendline invisible?

Not sure about the visible property for trendlines but this will make them go
away.

Charts("Chart1").SeriesCollection(1).Trendlines.De lete


"Zoltan" wrote:

Hello,

I have several charts and several trendlines on them. How can I hide the
trendlines (make them invisible)from VB code?

Thanks in advance for the help,
Zoltan

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default How to make a trendline invisible?

What if I do not want them to go away? I am using them for calculations (the
equation of them), so I need them. I just do not want to confuse the user by
the lots of trendlines on the chart. Showing them the data points is enough.

Matching the color of the trendline to the color of the background is one
solution, but at the gridlines it will make some confusion.

I hope there is another way.

Thanks in advance,
Zoltan

"JLGWhiz" wrote:

Not sure about the visible property for trendlines but this will make them go
away.

Charts("Chart1").SeriesCollection(1).Trendlines.De lete


"Zoltan" wrote:

Hello,

I have several charts and several trendlines on them. How can I hide the
trendlines (make them invisible)from VB code?

Thanks in advance for the help,
Zoltan

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default How to make a trendline invisible?

I couldn't find any info on doing this. Using xlColorIndex none gives an
error as does trying to set the border weight to 0 (doesn't exist, I think).
What about getting the regression equation from the data analysis functions
and skipping trendlines all together?
--
n00b lookn for a handout :)


"Zoltan" wrote:

What if I do not want them to go away? I am using them for calculations (the
equation of them), so I need them. I just do not want to confuse the user by
the lots of trendlines on the chart. Showing them the data points is enough.

Matching the color of the trendline to the color of the background is one
solution, but at the gridlines it will make some confusion.

I hope there is another way.

Thanks in advance,
Zoltan

"JLGWhiz" wrote:

Not sure about the visible property for trendlines but this will make them go
away.

Charts("Chart1").SeriesCollection(1).Trendlines.De lete


"Zoltan" wrote:

Hello,

I have several charts and several trendlines on them. How can I hide the
trendlines (make them invisible)from VB code?

Thanks in advance for the help,
Zoltan



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 65
Default How to make a trendline invisible?

OK. I recorded a macro that adds a trendline for a series (log in my case),
copies the equation and pastes it to the edge of the chart, then clears the
trendline. Maybe that will do it? This is just an example and will need to
be cleaned up for your purpose:

Sub No_trendline()
'
' No_trendline Macro
' Macro recorded 8/31/2007 by a2holder
'

'
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Trendlines.Add(Typ e:=xlLogarithmic,
Forward _
:=0, Backward:=0, DisplayEquation:=True,
DisplayRSquared:=False).Select
ActiveChart.SeriesCollection(1).Trendlines(1).Data Label.Select
ActiveChart.ChartArea.Select
ActiveChart.Paste
ActiveChart.SeriesCollection(1).Trendlines(1).Sele ct
Selection.Delete
End Sub

--
n00b lookn for a handout :)


"Zoltan" wrote:

What if I do not want them to go away? I am using them for calculations (the
equation of them), so I need them. I just do not want to confuse the user by
the lots of trendlines on the chart. Showing them the data points is enough.

Matching the color of the trendline to the color of the background is one
solution, but at the gridlines it will make some confusion.

I hope there is another way.

Thanks in advance,
Zoltan

"JLGWhiz" wrote:

Not sure about the visible property for trendlines but this will make them go
away.

Charts("Chart1").SeriesCollection(1).Trendlines.De lete


"Zoltan" wrote:

Hello,

I have several charts and several trendlines on them. How can I hide the
trendlines (make them invisible)from VB code?

Thanks in advance for the help,
Zoltan

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default How to make a trendline invisible?

You could use LINEST to calculate the coefficients in the worksheet from the
data. Bernard has a simple explanation:

http://people.stfx.ca/bliengme/ExcelTips/Polynomial.htm

while Tushar has gone into a great amount of detail:

http://tushar-mehta.com/publish_trai...nalysis/16.htm

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Arnie" wrote in message
...
OK. I recorded a macro that adds a trendline for a series (log in my
case),
copies the equation and pastes it to the edge of the chart, then clears
the
trendline. Maybe that will do it? This is just an example and will need
to
be cleaned up for your purpose:

Sub No_trendline()
'
' No_trendline Macro
' Macro recorded 8/31/2007 by a2holder
'

'
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Trendlines.Add(Typ e:=xlLogarithmic,
Forward _
:=0, Backward:=0, DisplayEquation:=True,
DisplayRSquared:=False).Select
ActiveChart.SeriesCollection(1).Trendlines(1).Data Label.Select
ActiveChart.ChartArea.Select
ActiveChart.Paste
ActiveChart.SeriesCollection(1).Trendlines(1).Sele ct
Selection.Delete
End Sub

--
n00b lookn for a handout :)


"Zoltan" wrote:

What if I do not want them to go away? I am using them for calculations
(the
equation of them), so I need them. I just do not want to confuse the user
by
the lots of trendlines on the chart. Showing them the data points is
enough.

Matching the color of the trendline to the color of the background is one
solution, but at the gridlines it will make some confusion.

I hope there is another way.

Thanks in advance,
Zoltan

"JLGWhiz" wrote:

Not sure about the visible property for trendlines but this will make
them go
away.

Charts("Chart1").SeriesCollection(1).Trendlines.De lete


"Zoltan" wrote:

Hello,

I have several charts and several trendlines on them. How can I hide
the
trendlines (make them invisible)from VB code?

Thanks in advance for the help,
Zoltan



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default How to make a trendline invisible?

Thanks Arnie,
this is what I will do. It seems, that it is the best solution.

Jon,
you suggested to use LINEST, but I found some discussions about this
funtions, and I read that LINEST is not too accurate. That is why I need to
use the trendline. Anyway, I will give a try, and see the difference between
trendline and linest results.

Thanks both of you!
Zoltan


"Arnie" wrote:

OK. I recorded a macro that adds a trendline for a series (log in my case),
copies the equation and pastes it to the edge of the chart, then clears the
trendline. Maybe that will do it? This is just an example and will need to
be cleaned up for your purpose:

Sub No_trendline()
'
' No_trendline Macro
' Macro recorded 8/31/2007 by a2holder
'

'
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Trendlines.Add(Typ e:=xlLogarithmic,
Forward _
:=0, Backward:=0, DisplayEquation:=True,
DisplayRSquared:=False).Select
ActiveChart.SeriesCollection(1).Trendlines(1).Data Label.Select
ActiveChart.ChartArea.Select
ActiveChart.Paste
ActiveChart.SeriesCollection(1).Trendlines(1).Sele ct
Selection.Delete
End Sub

--
n00b lookn for a handout :)


"Zoltan" wrote:

What if I do not want them to go away? I am using them for calculations (the
equation of them), so I need them. I just do not want to confuse the user by
the lots of trendlines on the chart. Showing them the data points is enough.

Matching the color of the trendline to the color of the background is one
solution, but at the gridlines it will make some confusion.

I hope there is another way.

Thanks in advance,
Zoltan

"JLGWhiz" wrote:

Not sure about the visible property for trendlines but this will make them go
away.

Charts("Chart1").SeriesCollection(1).Trendlines.De lete


"Zoltan" wrote:

Hello,

I have several charts and several trendlines on them. How can I hide the
trendlines (make them invisible)from VB code?

Thanks in advance for the help,
Zoltan

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default How to make a trendline invisible?

For most data sets, LINEST and the trendline equation produce the same
result. In Excel 2003, there was a change made to the formerly best-in-class
trendline formula calculation which may lead to false results (changing a
small value to zero in an erroneous assumption that the small number is due
to roundoff when converting from binary to decimal), where the LINEST
calculations stay accurate. Also, people often forget to read the trendline
coefficients with sufficient digits to use in subsequent calculations.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Zoltan" wrote in message
...
Thanks Arnie,
this is what I will do. It seems, that it is the best solution.

Jon,
you suggested to use LINEST, but I found some discussions about this
funtions, and I read that LINEST is not too accurate. That is why I need
to
use the trendline. Anyway, I will give a try, and see the difference
between
trendline and linest results.

Thanks both of you!
Zoltan


"Arnie" wrote:

OK. I recorded a macro that adds a trendline for a series (log in my
case),
copies the equation and pastes it to the edge of the chart, then clears
the
trendline. Maybe that will do it? This is just an example and will need
to
be cleaned up for your purpose:

Sub No_trendline()
'
' No_trendline Macro
' Macro recorded 8/31/2007 by a2holder
'

'
ActiveChart.SeriesCollection(1).Select
ActiveChart.SeriesCollection(1).Trendlines.Add(Typ e:=xlLogarithmic,
Forward _
:=0, Backward:=0, DisplayEquation:=True,
DisplayRSquared:=False).Select
ActiveChart.SeriesCollection(1).Trendlines(1).Data Label.Select
ActiveChart.ChartArea.Select
ActiveChart.Paste
ActiveChart.SeriesCollection(1).Trendlines(1).Sele ct
Selection.Delete
End Sub

--
n00b lookn for a handout :)


"Zoltan" wrote:

What if I do not want them to go away? I am using them for calculations
(the
equation of them), so I need them. I just do not want to confuse the
user by
the lots of trendlines on the chart. Showing them the data points is
enough.

Matching the color of the trendline to the color of the background is
one
solution, but at the gridlines it will make some confusion.

I hope there is another way.

Thanks in advance,
Zoltan

"JLGWhiz" wrote:

Not sure about the visible property for trendlines but this will make
them go
away.

Charts("Chart1").SeriesCollection(1).Trendlines.De lete


"Zoltan" wrote:

Hello,

I have several charts and several trendlines on them. How can I
hide the
trendlines (make them invisible)from VB code?

Thanks in advance for the help,
Zoltan



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete rather than make Invisible Corey Excel Programming 6 May 11th 07 02:59 PM
make VbA invisible newbie in hell Excel Programming 3 April 10th 07 06:42 PM
How Invisible Can You Make Your Code??? Chuckles123[_88_] Excel Programming 5 July 22nd 05 06:51 PM
Make counter invisible hotherps[_6_] Excel Programming 2 January 17th 04 04:23 PM
How to make the Toolbar Invisible through VBA Atif Akbar[_2_] Excel Programming 2 December 11th 03 06:55 AM


All times are GMT +1. The time now is 07:42 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"