Setting a Formula in German Excel

P

Phil

I have some Excel VBA macros which work fine here in the UK, but there is a
problem when someone tries to use them in Germany. The problem is caused
because in the German version, the Excel function names are different. I am
generatimg some named ranges at runtime which contain various functions, and
when I try to use the Name I get an error.
The following article addresses this issue:
http://msdn2.microsoft.com/en-us/library/aa537159(office.11).aspx
The section "Using Reflection for COM Interop Calls" contains some example
VB code which looks like it should fix the problem for me, but this code is
designed for VB 2005, not for Excel VBA. Does anyone have a VBA version of
the SetInternationalProperty function that I can use, or suggest another way
around the problem?

Also can anyone suggest a way of reproducing and testing this here? I tried
setting the language to German in International Settings, but I don't get
the error here. Do I need to install a German version of Windows or Office
or both? Is there a way of installing the German files without purchasing a
completely new version? We are using Windows XP and Office from the MS
Action Pack.

TIA
Phil.
 
P

Phil

I think I may have found a fix for this, which is to use the RefersToLocal
parameter instead of RefersTo when I call Names.Add.
I still need to know how I can test this without travelling to Germany, and
hopefully without having to purchase various different language versions of
Windows and/or office (it will need to run in France, Japan and various
other countries too).
 
J

Jialiang Ge [MSFT]

Hello Phil,

I'm glad to see that you've already fixed the first question about the
function 'SetInternationalProperty'. :

As to your second question about how to test VBA for a different language
version of office, the language packs are the best I can recommend from my
point of view. For example, in the English version of Excel, you have
Sheet1, Sheet2, etc. in German they are named Tabelle1, Tabelle2, etc. If
you use something like Sheets("Sheet1") in combination with the German
version, it will fail. In this way, I reproduced your first question in my
office system after I installed the German MUI Pack. The overall
recommendation would be to stay away from these strings and use i.e.
Sheets(1) to access the object. The other Office applications have similar
strings that change between languages.

You may visit the following link to buy MUI packs for Office 2007.
http://buy1.trymicrosoftoffice.com/buyus/product.aspx?family=langpack&cultur
e=en-US
If you are using Office 2003, Office 2003 Multilanguage Packs are only
available by Volume Licensing. If you have such an agreement with MS, you
might already have the MUI Packs somewhere in house. :

Sincerely,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

==================================================
For MSDN subscribers whose posts are left unanswered, please check this
document: http://blogs.msdn.com/msdnts/pages/postingAlias.aspx

Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications. If you are using Outlook Express/Windows Mail, please make sure
you clear the check box "Tools/Options/Read: Get 300 headers at a time" to
see your reply promptly.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Phil

I'm glad to see that you've already fixed the first question about the
function 'SetInternationalProperty'. :

I think I've fixed it, but I can't test it. At the moment I'm having to send
out test versions to end-users, and ask them to let me know if it works or
not, which is obviously not very professional looking.
As to your second question about how to test VBA for a different language
version of office, the language packs are the best I can recommend from my
point of view. For example, in the English version of Excel, you have
Sheet1, Sheet2, etc. in German they are named Tabelle1, Tabelle2, etc. If
you use something like Sheets("Sheet1") in combination with the German
version, it will fail. In this way, I reproduced your first question in my
office system after I installed the German MUI Pack. The overall
recommendation would be to stay away from these strings and use i.e.
Sheets(1) to access the object. The other Office applications have similar
strings that change between languages.

I am aware of the issues with sheet naming and the number formatting issues.
I have occasionally had problems with this over the years, but have learned
to avoid using strings, when I can use numeric values instead. This new
problem is actually in some code that we got a contractor in to do, and he
obviously wasn't aware of the language issues. In this case when setting a
formula in code there is no way of avoiding using a string, so hopefully
using FormulaLocal and RefersToLocal will fix it, and hopefully I have
identified all the places where he has used this in the code.
You may visit the following link to buy MUI packs for Office 2007.

I don't like the word 'buy' in there :-(
If you are using Office 2003, Office 2003 Multilanguage Packs are only
available by Volume Licensing.

We need to support 2000, XP & 2003, and will also need to support 2007 soon.
If you have such an agreement with MS, you
might already have the MUI Packs somewhere in house. :

We have various versions of office through MAPS, but I don't think this
includes the language packs, at least I can't see anything in the box of
disks we have. I wondered if ti was something that might be available as a
free download if you already have the office licenses?
 
J

Jialiang Ge [MSFT]

Hello Phil

I suggest that you should contact your Microsoft sales person at Microsoft
UK to find out what your conditions are because he may have these CDs
somewhere or get them as part of your contract. In the meantime, we will
also try to contact your local license team of Microsoft. Maybe they have
options or ideas. I will inform you of any updates.

Sincerely

Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

Hi Phil,

Would you mind letting me know the result of the suggestions? If you need
further assistance, feel free to let me know. I will be more than happy to
be of assistance.

Have a great day!

Sincerely,
Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
J

Jialiang Ge [MSFT]

Hello Phil

We finally connected to your local license team of Microsoft. But they said
it all depends on your conditions. How about your contact with your
Microsoft sale person? If there's anything I can do for you, please feel
free to let me know.

Sincerely

Jialiang Ge ([email protected], remove 'online.')
Microsoft Online Community Support

=================================================
When responding to posts, please "Reply to Group" via your newsreader
so that others may learn and benefit from your issue.
=================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
 
P

Phil

We finally connected to your local license team of Microsoft. But they
said
it all depends on your conditions. How about your contact with your
Microsoft sale person? If there's anything I can do for you, please feel
free to let me know.

Thanks, I emailed MAPS, and they said our license only provides us with our
own localised (English) version of Office. They gave me some details of
where I could purchase further versions, but I don't think I'll bother. I'll
just have to get one of our friendly customers to test it for me, or wait
until one of our chaps visits Germany.
One of the problems is that a lot of people in Germany are still on Office
2000, so it really needs testing on 2000, XP & 2003. It is only a matter of
time before I need to support the newer versions too.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top