PC Review


Reply
Thread Tools Rate Thread

Change Gradient Fill Colors of Bar Chart data points

 
 
PaulPW
Guest
Posts: n/a
 
      21st May 2010
I’m 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. I’ve waded
through the object model and help file and tried all kind of syntaxes, but
can’t 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 doesn’t support this property or method”. Recording a macro of
my setting this manually doesn’t help me since Excel does not record any of
these steps in VBA!!
I have tried the following:
..Interior.Gradient.InteriorGradientStop(1).GradientStopColorIndex= RGB(a,b,c)
..Interior.InteriorGradientStop(1).GradientStopColorIndex= 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!

I’m sure this is something simple, but I just can’t get it!
Any help much appreciated.
Paul
 
Reply With Quote
 
 
 
 
Herbert Seidenberg
Guest
Posts: n/a
 
      22nd May 2010
Excel 2007 Chart
Macro, fill color gradient.
http://c0718892.cdn.cloudfiles.racks...05_21_10a.xlsm
Pdf preview:
http://www.mediafire.com/file/ewzzhy2yedd/05_21_10a.pdf
 
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
How do I select two colors for Gradient Fill Excel 2007 Hennie Microsoft Excel Charting 1 14th Aug 2009 09:15 AM
Change pattern for individual data points on chart JimT Microsoft Excel Programming 1 9th Dec 2008 10:40 PM
Re: Excel bar chart formatting of bars to change colors as data change Jon Peltier Microsoft Excel Misc 0 24th Jan 2007 06:07 PM
Can I change the colors in the fill color chart? =?Utf-8?B?R2VuZXNpcyBQYXQ=?= Microsoft Excel Misc 2 28th Mar 2006 07:51 PM
Changing fill color gradient on chart melissa Microsoft Excel Charting 1 21st Feb 2004 01:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:38 PM.