Link to home
Start Free TrialLog in
Avatar of rrgw
rrgw

asked on

Problems with setting the color of the bar in an MSChart control

Hi all,
I must be doing something very silly. I want to change the
color of the bar in an MSChart Control. I found (and pasted)
the code to do that from http://support.microsoft.com/default.aspx?scid=kb;en-us;177997

The resulting code is:
        ReDim arr(1 to 5, 1 To 2)
         For j = 1 To 5
            arr(j, 1) = j
            arr(j, 2) = j*100
        Next j
       
        With mschart1.Plot.SeriesCollection(1).DataPoints(-1)
            .Brush.Style = VtBrushStyleSolid
            .Brush.FillColor.Red = 255
            .Brush.FillColor.Green = 0
            .Brush.FillColor.Blue = 0
        End With
        mschart1.ChartData = arr()

But whatever the R,G,B combination I use, the bars are always green!!

(:confused)

Any clue? Thank you very much,

rr.



ASKER CERTIFIED SOLUTION
Avatar of Amro Osama
Amro Osama
Flag of Egypt image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial