ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Determine excel language (https://www.excelbanter.com/excel-programming/338520-determine-excel-language.html)

DS NTE

Determine excel language
 
How can I determine witch language excel "uses"?
My problem is that som users have an english version and some users have an
norwegian version. This causes problems when working with commandbars:

Norwegian: Set CmdBarMenu = CmdBar.Controls("Verktøy")
English: Set CmdBarMenu = CmdBar.Controls("Tools")

Is there a global method of doing this so this language issue wont cause me
any trouble?


knut





Bob Phillips[_6_]

Determine excel language
 
Use the Toolbar Id


Set CmdBarMenu = Application.CommandBars.FindControl(ID:=30007)

--

HTH

RP
(remove nothere from the email address if mailing direct)


"DS NTE" wrote in message
...
How can I determine witch language excel "uses"?
My problem is that som users have an english version and some users have

an
norwegian version. This causes problems when working with commandbars:

Norwegian: Set CmdBarMenu = CmdBar.Controls("Verktøy")
English: Set CmdBarMenu = CmdBar.Controls("Tools")

Is there a global method of doing this so this language issue wont cause

me
any trouble?


knut







Tom Ogilvy

Determine excel language
 
see the Excel VBA help on the Application.International function.

--
Regards,
Tom Ogilvy

"DS NTE" wrote in message
...
How can I determine witch language excel "uses"?
My problem is that som users have an english version and some users have

an
norwegian version. This causes problems when working with commandbars:

Norwegian: Set CmdBarMenu = CmdBar.Controls("Verktøy")
English: Set CmdBarMenu = CmdBar.Controls("Tools")

Is there a global method of doing this so this language issue wont cause

me
any trouble?


knut







DS NTE

Determine excel language
 
Thank you - got it working!!!

knut
"Tom Ogilvy" skrev i melding
...
see the Excel VBA help on the Application.International function.

--
Regards,
Tom Ogilvy

"DS NTE" wrote in message
...
How can I determine witch language excel "uses"?
My problem is that som users have an english version and some users have

an
norwegian version. This causes problems when working with commandbars:

Norwegian: Set CmdBarMenu = CmdBar.Controls("Verktøy")
English: Set CmdBarMenu = CmdBar.Controls("Tools")

Is there a global method of doing this so this language issue wont cause

me
any trouble?


knut










All times are GMT +1. The time now is 09:47 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com