View Full Version : Setting RGB color in MSGraph object.

03-20-2006, 01:15 PM
Hi All,

Please find below VBA code from macro(.bas).

Set oleGraph = slide1.Shapes.addOLEObject(287.0,93.0,230.0,393,"MSGraph.Chart","",0,"",0,"", 0)
Set chartObject = oleGraph.OLEFormat.Object
Set dsChart= chartObject.Application.DataSheet
Set chartProxy = chartObject
chartProxy.PlotArea().Fill().ForeColor().SchemeColor = 20

This VBA code is setting foreColor to 20 from schemaColor object, is it possible to set foreColor from RGB values? If possible, then please let me know how to set ForeColor with RGB values?


03-20-2006, 04:40 PM
Hi Sarath,

You can set the value but it will go to the nearest color by value in the scheme.
Full details at rpdslides.com (http://www.rdpslides.com/pptfaq/FAQ00777.htm)

03-21-2006, 08:34 AM
Hi Killian,

I checked this URL(rpdslides.com (http://www.rdpslides.com/pptfaq/FAQ00777.htm)), they are talking about changing the color pallatte, I would like to know without doing any changes to color palatte how to set RGB color to graph object? Is it possible?


03-22-2006, 04:35 PM
I think you may have misunderstood the article.
It states
you cannot select any color but those on the MSGraph color paletteand when talking about using VBA to change the color pallete
In short, you can do it manually but not under program controlSo, no. AFAIK, it cannot be done with code.