>Hi All,
>
>Any idea of how I can change the ChartType on my form. I have looked into the help file vbaxl9.chm and there is a whole list of charts I can create.
>
>The problem is that they expect you to code something like:
>.ChartType = xlBubble, but this does not work in VFP.
>I have tried to code:
>.ChartType = somenumber and this works, but how can I find the corresponding numbers in VFP? When I tried to change numbers, some of them produce an error message.
>
>Or maybe there is another way to do that?
>
>Appreciating your help.
>
>Jonathan
Jonathan,
xlBubble is a defiend constant numeric value. You could use it :
#define xlBubble 15
.ChartType = xlBubble
I think there were all excel constants here in downloads section or at John Harvey's (
www.johnharvey.com ?) site.
If you have VFP7, you could get all constants using object browser (add excel type library, drag&drop enumeration group from enums node).
Also w/o using object browser intellisense would help :
LOCAL oExcel as Excel.Application
oExcel =CREATEOBJECT('Excel.Application')
*...
oExcel.ActiveWorkbook.ActiveChart.ChartType=
as you press [=] intellisense would pop a listbox showing all available charttypes to select.
You could also get constants with west-wind utility (wwGetConstants ?)
If none of the above work. Launch excel :
[Alt+F11], [F2], write xlBubble [enter]. You'd see the whole group and below listboxes actual numeric value.
Cetin