From: Karen on 6 Apr 2010 09:31 Hello Nick, I am new to using Macros in Excel and am trying to set the colour of a marker depending on its value. For example: if the value in the table is less than 4 the colour is red, if between 4 and 7 it should be yellow and if between 7 and 10 the value is green. Have you assigned colours to markers based on this type of criteria? Would you have a sample piece of code that could help me out? Thanks, Karen "Nick" wrote: > I've done this hundreds of times in 2003, but in 2007 I'm hitting some snags. > I think it has to do with the chart styles found in excel 2007. I'm trying > to change the color of a series in my line graph using the following code: > > Set ch = Worksheets("Chart").ChartObjects(1) > Set objSeries = ch.Chart.SeriesCollection(1) > > objSeries.Format.Line.ForeColor.RGB = RGB(255, 127, 0) > > But, this isn't working at all. Nothing is happening to the line. I'm able > to do other things to the series, such as change the marker style, the marker > color, the line style, but not the line color. > > Any ideas???
|
Pages: 1 Prev: how do I get a plain lined tracking sheet Next: Different values for error bars in series |