Consulting

Results 1 to 6 of 6

Thread: vba powerpoint chart datalabel

  1. #1

    vba powerpoint chart datalabel

    Hi,

    I am trying to change the chart datalabel font color to the color in fill color palette, through vba code.
    the below code is not working. please help me.

    Activewindow.Selection.ShapeRange(1).Chart.SeriesCollection(1).datalabels.f ont.color.objectthemecolor = msoThemeColorAccent5

    Thanks and Regards,
    Balu.

  2. #2
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    Assuming you have a chart selected and only want to set the color for series 1

    ActiveWindow.Selection.ShapeRange(1).Chart.SeriesCollection(1).DataLabels.Format.TextFrame2.TextRange.Font.Fill.ForeColor.ObjectThemeColor = msoThemeColorAccent5
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  3. #3
    Thank you John. it worked. life saver!!!.

  4. #4
    Hello John,
    Just for learning, what is the difference between the objectthemecolor vs schemecolor?
    Am really confused with these two.

    Thanks for the clarification.

    Regards,
    Balu.

  5. #5
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    schemecolor (AFAIK) is for use with versions before 2007. You should use ObjectThemeColor in modern versions.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

  6. #6
    Hi John,

    Thank you very much for the clarification.

    Regards,
    Balu.

Tags for this Thread

Posting Permissions

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