How to get the available languages (MUI) of Excel using VBA?

C

Cat

I wrote a C# application that inserts data to a Workbook using VBA.

The program worked fine on my PC but caused the "Old format or invalid
type library" exception on another person's PC. The person was using
English version of Excel and Windows, but had set the regional format
to Korean. I have read some articles about this problem on MSDN, and
found causes and solutions. It happens when Excel does not have the
MUI (Multilingual User Interface) for the language that the
application is using. That is, my C# application was using Korean
culture because it was the system's regional format, but the English
version of Excel did not have Korean MUI.

There was a solution. I forced the culture to be "en-US" and it worked
OK. But come to think of it, what if the user "has" Korean MUI? It
does not seem to be right to force "en-US" every time when I don't
have to. So the question is, who do I know if the Excel has the MUI
for the language which is the system's default regional format? Is
there any way to get the list of MUI languages that Excel has on a
particular system using VBA?

A dirty solution could be first trying to insert some data to Excel,
then if "Old format or invalid type library" happens then forcing the
language to be "en-US". But it really seems to be dirty.
 

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