Could some body enlighten me about how to create a combo box linked to a Bar graph that let me change its bar background color? Thxs
Here is the basic approach. I've put the code into a standard module, though it could just as well be run in the worksheet_change event.
For more help, search the Forum using terms like Conditionally Color Chart SeriesOption Explicit Sub Change_Chart_Series_Color() Dim icolor As Integer Dim Bar As ChartObject Select Case Range("E1").Value 'cell linked to combo box Case 1: icolor = 3 'red Case 2: icolor = 6 ' yellow Case 3: icolor = 41 ' blue End Select For Each Bar In ActiveSheet.ChartObjects If Bar.Chart.ChartType = xlColumnClustered Then Bar.Chart.SeriesCollection(1).Interior.ColorIndex = icolor End If Next Bar End Sub
Palmetto
Do you know . . . ?
You can leave feedback and add to the reputation of all who contributed a helpful response to your solution by clicking the star icon located at the left in one of their post in this thread.
Thanks Palmetto.You still honoring your title.
Last edited by teylyn; 03-30-2010 at 08:12 PM. Reason: removed spurious quote
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks