Solved

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

Posted on 2004-04-30
1
630 Views
Last Modified: 2013-12-26
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.



0
Comment
Question by:rrgw
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
OHDev2004 earned 50 total points
ID: 10968504
instead of :
            .Brush.Style = VtBrushStyleSolid
            .Brush.FillColor.Red = 255
            .Brush.FillColor.Green = 0
            .Brush.FillColor.Blue = 0

Try this:
.Brush.FillColor.Set 255, 0, 0

OHDev2004
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month5 days, 7 hours left to enroll

626 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question