Consulting

Results 1 to 4 of 4

Thread: Setting RGB color in MSGraph object.

  1. #1

    Setting RGB color in MSGraph object.

    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
    oleGraph.Fill.visible=msoFalse
    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?

    Regards,
    Sharath.

  2. #2
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    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
    K :-)

  3. #3
    Hi Killian,

    I checked this URL(rpdslides.com), 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?

    Regards,
    Sharath.

  4. #4
    VBAX Master Killian's Avatar
    Joined
    Nov 2004
    Location
    London
    Posts
    1,132
    Location
    I think you may have misunderstood the article.
    It states
    you cannot select any color but those on the MSGraph color palette
    and when talking about using VBA to change the color pallete
    In short, you can do it manually but not under program control
    So, no. AFAIK, it cannot be done with code.
    K :-)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •