C
Casey Brown
Hi! I have a VB6 project which involves inserting and manipulating an
MSGraph chart in PPT (XP).
My chart is always a pie chart. I am trying to set the pie segments to
different colors.
For Each sers In grph.SeriesCollection
sers.Points(1).Interior.Color = RGB(161, 61, 58)
sers.Points(2).Interior.Color = RGB(220, 130, 64)
sers.Points(3).Interior.Color = RGB(102, 51, 104)
sers.Points(4).Interior.Color = RGB(12, 38, 120)
Next sers
The problem is that the colors wind up being blues and black instead of the
ones I am specifying (a red, orange, purple, and blue, basically).
Interestingly, if i use simpler colors like RGB(255,0,0) and RGB(0,255,0),
they work fine.
If I Debug.Print ser.Points(1).Interior.Color after it gets set the result
is 10040115. The decimal notation for the color I am setting it to is
3816865. Why doesn't it get set correctly? Is there some other color
format I should be using?
Has anyone run into this before, and does anyone know how to get the pies to
be the colors I want? Any suggestions are most welcome.
Thanks in advance for your time!
-Casey
MSGraph chart in PPT (XP).
My chart is always a pie chart. I am trying to set the pie segments to
different colors.
For Each sers In grph.SeriesCollection
sers.Points(1).Interior.Color = RGB(161, 61, 58)
sers.Points(2).Interior.Color = RGB(220, 130, 64)
sers.Points(3).Interior.Color = RGB(102, 51, 104)
sers.Points(4).Interior.Color = RGB(12, 38, 120)
Next sers
The problem is that the colors wind up being blues and black instead of the
ones I am specifying (a red, orange, purple, and blue, basically).
Interestingly, if i use simpler colors like RGB(255,0,0) and RGB(0,255,0),
they work fine.
If I Debug.Print ser.Points(1).Interior.Color after it gets set the result
is 10040115. The decimal notation for the color I am setting it to is
3816865. Why doesn't it get set correctly? Is there some other color
format I should be using?
Has anyone run into this before, and does anyone know how to get the pies to
be the colors I want? Any suggestions are most welcome.
Thanks in advance for your time!
-Casey