+ Reply to Thread
Results 1 to 2 of 2

How to change the bg color of a label on a graph

Hybrid View

gzski23 How to change the bg color of... 07-31-2008, 11:07 AM
Rubeus_Hagrid How to change the bg color of... 07-31-2008, 11:35 AM
  1. #1
    Registered User
    Join Date
    04-16-2008
    Posts
    14

    How to change the bg color of a label on a graph

    Hey all,

    I have a dynamic chart in excel where data points on a chart move around. I am looking for an add-in or function for charting that would automatically change the font color or background color of the label that is connected to a data point. Can anyone point me in the right direction?

    Thanks,
    Graham

  2. #2
    Registered User
    Join Date
    07-18-2008
    Location
    India
    Posts
    68

    How to change the bg color of a label on a graph

    Hi,

    Please try the following codes :

    Sub ColorLabel()
    
           ActiveSheet.ChartObjects("Chart 1").Activate
           ActiveChart.Legend.Select
           Selection.Interior.Color = RGB(125, 0, 0)
           Selection.Font.Color = RGB(0, 225, 0)
           Selection.Font.Background = xlTransparent
        
    End Sub
    Please use code tags
    Last edited by Andy Pope; 08-09-2008 at 08:37 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1