View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
PaulPW PaulPW is offline
external usenet poster
 
Posts: 4
Default Change Gradient Fill Colors of Bar Chart data points

Im trying to modify the gradient fill colors of single data points on a bar
charts (in Excel 2007). The bar chart already has gradient fills defined
manually.
I think I need to alter different child properties of .Interior, not the
..ColorIndex property that would apply to non-gradient fills. Ive waded
through the object model and help file and tried all kind of syntaxes, but
cant get at the gradient without raising an error such as Run-time error
1004: Application-defined or Object-defined error or Run-time error
438: Object doesnt support this property or method. Recording a macro of
my setting this manually doesnt help me since Excel does not record any of
these steps in VBA!!
I have tried the following:
..Interior.Gradient.InteriorGradientStop(1).Gradie ntStopColorIndex= RGB(a,b,c)
..Interior.InteriorGradientStop(1).GradientStopCol orIndex= RGB(a,b,c)
..Interior.Gradient.Colorstops(1).ColorIndex = RGB(a,b,c)
(all the above with ActiveChart.SeriesCollection(1).Points(1) either
referenced or selected)
..Gradient.ColorStops.Clear raises an error as well!

Im sure this is something simple, but I just cant get it!
Any help much appreciated.
Paul