View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
theLuggage theLuggage is offline
external usenet poster
 
Posts: 23
Default Creating charts in non-English versions of Excel

Thanks for the help, Peter.

The German equivalent for "Line - Column" is "Linie - Säule".
The German equivalent for "Line - Column on 2 Axes" is "Linie - Säule auf
zwei Achsen".



"Peter T" wrote:

I can't find any ID's or named constants for the BuiltIn custom charts, or
something like a 'LocalName'. Even if there is such an alternative I don't
see how it could be used, but maybe some else knows.

Is it definitely the case the code fails because of non-English names, and
not because the type cannot be applied due to an inappropriate number of
series?

Assuming it is indeed a language problem, the obvious solution would be to
record a macro and get the German name of the custom chart type. But I guess
you need the code to work in all languages. If you care to post the German
names for one or two types I have an idea for a kludgy workaround.

Regards,
Peter T

"theLuggage" wrote in message
...
I'm not sure I was clear on the problem. The problem is that in the

foreign
language version of Excel, there is no Custom chart type that corresponds

to
the English TypeName. For example, in German the TypeName is not "Line -
Column". It is whatever the German equivalent is. So it fails with an

error
saying that "Line - Column" is not a valid type. If I use the German
equivalent of "Line - Column" it works fine.

Does that make more sense?

Thanks again for the help.

"theLuggage" wrote:

We have a fairly sophisticated Excel AddIn that generates all sorts of

Chart
types. It works fine in English versions of Excel, but not foreign

langauage
versions.

We've narrowed down the problem to when we're assigning the TypeName

when we
create a chart. Here's an example of three types that don't work:
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:="Line -

Column"
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:= "Line -

Column
on 2 Axes"
ActiveChart.ApplyCustomType ChartType:=xlBuiltIn, TypeName:="Lines on 2

Axes"

The issue seems to be that the TypeName is localized to the native

language.
Does Excel have IDs or constants we can use? I've seen the list of
constants for the standart Chart types. But there doesn't seem to be
constants for the custom types.

Thanks in advance for your help.