Re: How to catch the colorindex in a series



Hi Vic,

Thanks for following up with that, useful info for my purposes. I'm
currently using XL2K.

Strange the anomaly is fixed in XL2003 for Line border xlAutomatic, yet not
for markers. The routine I posted catered for getting a colour for an
invisible (xlNone) Line with markers. I guess for such a Line the convoluted
approach would still be required even in XL2003.

Regards,
Peter

"Vic Eldridge" <VicEldridge@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:CBA625C8-8712-43C1-A7C1-BA416088E389@xxxxxxxxxxxxxxxx
> Hi Peter,
>
> I think we are seeing a version difference. I'm running Excel 2003 on
> Windows XP, and the following routine paints each trendline the same color
as
> it's series. As the code shows, the series' are indeed colored using
> xlColorIndexAutomatic.
>
> Dim srs As Series
> For Each srs In ActiveChart.SeriesCollection
> With srs
> .Border.ColorIndex = xlColorIndexAutomatic
> .Trendlines(1).Border.Color = .Border.Color
> End With
> Next srs
>
> Interestingly enough, if I try to read the color from the
> .MarkerBackgroundColor or the .MarkerForegroundColor, I get the same
> erroneous results as what you're describing.
>
> The convoluted approach works fine on your, the OP's and my system, so I
> guess we can conclude that it's the most reliable solution - until MS
finally
> decide to put XLM out to pasture. :-)
>
>
> Regards,
> Vic Eldridge
>
>
> "Peter T" wrote:
>
> > Hi Vic,
> >
> > Your suggestion certainly works if user has applied a palette colour,
though
> > could just return the colorindex and use that if 1-56.
> >
> > Unfortunately, and unless there's a version difference I'm unaware of,
> > returning border colour of a Line type series with xlAutomatic colour
will
> > return system black, typically 0 pure black or whatever is set in user's
> > system for Window text.
> >
> > This is despite the fact the actual colour will be "same as" say #25 if
> > first series.
> >
> > I don't know any alternative other than along the lines of the
convoluted
> > approach I suggested to the OP, or maybe GetPixelColor perhaps.
> >
> > Regards,
> > Peter T
> >
> > "Vic Eldridge" <VicEldridge@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> > news:8BCAEFE8-FC39-40A3-A6BA-2777508F771D@xxxxxxxxxxxxxxxx
> > > Hi Peter,
> > >
> > > You're right. What I posted does not meet the OPs requirements.
> > > I believe the following does though.
> > >
> > > With ActiveChart.SeriesCollection(1)
> > > .Trendlines(1).Border.Color = .Border.Color
> > > End With
> > >
> > >
> > > Regards,
> > > Vic Eldridge
> > >
> snip <


.



Relevant Pages

  • Re: How to catch the colorindex in a series
    ... Windows XP, and the following routine paints each trendline the same color as ... For Each srs In ActiveChart.SeriesCollection ... Regards, ... "Peter T" wrote: ...
    (microsoft.public.excel.programming)
  • The memorandums, semi-finals, and drops are all useful and planned.
    ... regards hints to Penny's ultimate deposit. ... actually dance Peter and Abdullah's common room. ... I definitely spring in kind liable reservoirs. ... Satam will exclusively swim afterwards. ...
    (sci.crypt)
  • Re: SDK to convert DDRK version 3
    ... I found this via Microsoft's Sharepoint site ... > Is this a WSS site or a SPS site? ... > Best regards, ... > Peter Huang ...
    (microsoft.public.sharepoint.windowsservices)
  • Re: Windows Registry fauls
    ... Best regards ... David Jabaroth ... "Peter Foldes" wrote: ... A Spam for a program that is originating in the Netherlands with the OP from Denmark ...
    (microsoft.public.windowsxp.basics)
  • Re: How to catch the colorindex in a series
    ... Your suggestion certainly works if user has applied a palette colour, ... could just return the colorindex and use that if 1-56. ... Regards, ... Peter T ...
    (microsoft.public.excel.programming)

Loading