Programming for MS Graph through another application doesn't allow you
the benefit of Excel's macro recorder. Some of the object model is the
same, so if you recorded a macro in Excel, then made the necessary
adjustments, you could probably get it figured out.
You have to keep digging through the object model, which has a tree
something like this:
MSGraph Application
+Chart
+SeriesCollection
+Series
+Points
+Point
+Interior
+Color
and you can set a color using RGB(red,green,blue). The command would
look something like this:
With chtMSGraph
' defined differently within each parent app
.SeriesCollection(1).Points(2).Interior.Color = RGB(255,0,0)
End With
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/
_______
Dave Dawson wrote:
Thank you, Jon.
Your post has a wealth of information. Yes, vfp does refer to Visual FoxPro
in this case.
I'm still feeling like an idiot. Why does it have to be so damned hard to
learn how to programmatically make a specific column in a column chart, or a
specific pie piece in a pie chart appear as a specific color?
Surely I'm not the first person in the world to have wanted to do that. If
the object browser or help file has that information, I haven't yet been
smart enough to ferret it out. I have also searched excel help and excel
vbe help to no avail.
I do recognize that I may be losing it, however, it isn't readily apparent
from all the other things I do.
I understand also that you probably didn't create the supposed documentation
for msgraph, and shouldn't have to put up with my frustrations. I don't
know how to take the frustrations to the people who are responsible (or
irresponsible) for agravating them.
If I am just obviously too stupid to find the information from what I've
been presented, please tell me that too, and I'll seriously consider getting
in another line of work.
If there is an actual representative of Microsoft on this forum, please tell
me if Microsoft even gives a damn that a reasonably intelligent person has
this much difficulty finding information that it seems to me should be
readily available.
Thanks,
Dave
****************
"Jon Peltier" wrote in message
...
Dave -
Dumb question: VFP = FoxPro? Then you ought to be able to hack your way
through this issue. I found some web resources that show how to use MS
Graph (or even Excel) from FoxPro, using VBA to access the chart's object
model:
http://www.tedroche.com/Present/2003/ADX304.html
http://www.dfpug.de/loseblattsammlun...rs/advauto.htm
If you get stuck, you can use the object browser in the VB Editor to
explore the MSG object model, or find other examples around the web.
The PowerPoint FAQ (http://pptfaq.com) pages contain information and links
about automation of MSG.
- Jon
-------
Jon Peltier, Microsoft Excel MVP
Peltier Technical Services
Tutorials and Custom Solutions
http://PeltierTech.com/