Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
I'm wondering if there's a way to know what is the windows language installed inside the computer where the macro is runned. I tried to find a parameter inside GetLocaleInfo function but all seems to be related to control panel settings. Any idea? Thanks! Alex -- Alex St-Pierre |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub os()
MsgBox Application.OperatingSystem End Sub -- Don Guillett SalesAid Software "Alex St-Pierre" wrote in message ... Hi, I'm wondering if there's a way to know what is the windows language installed inside the computer where the macro is runned. I tried to find a parameter inside GetLocaleInfo function but all seems to be related to control panel settings. Any idea? Thanks! Alex -- Alex St-Pierre |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I would like to know if the OS is french or english, is there a way to know
that? Thanks! -- Alex St-Pierre "Don Guillett" wrote: Sub os() MsgBox Application.OperatingSystem End Sub -- Don Guillett SalesAid Software "Alex St-Pierre" wrote in message ... Hi, I'm wondering if there's a way to know what is the windows language installed inside the computer where the macro is runned. I tried to find a parameter inside GetLocaleInfo function but all seems to be related to control panel settings. Any idea? Thanks! Alex -- Alex St-Pierre |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Alex,
If you're running on systems with only a single OS installed and the OS is WinXP, WinME, Win2k or beyond, then WMI is present and the following will work. The OS language will be returned as a code value; 1033 for American English, 1036 for French. Sub OSlanguage() Dim objWMI As Object Dim colItems As Object Dim objItem As Object Dim languageCode As Integer Set objWMI = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\.\root\cim v2") Set colItems = objWMI.ExecQuery _ ("Select * from Win32_OperatingSystem") For Each objItem In colItems languageCode = objItem.OSlanguage Next objItem MsgBox languageCode End Sub Steve Yandl "Alex St-Pierre" wrote in message ... I would like to know if the OS is french or english, is there a way to know that? Thanks! -- Alex St-Pierre "Don Guillett" wrote: Sub os() MsgBox Application.OperatingSystem End Sub -- Don Guillett SalesAid Software "Alex St-Pierre" wrote in message ... Hi, I'm wondering if there's a way to know what is the windows language installed inside the computer where the macro is runned. I tried to find a parameter inside GetLocaleInfo function but all seems to be related to control panel settings. Any idea? Thanks! Alex -- Alex St-Pierre |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Not sure if it will help you but have a look at LanguageSettings in help,
also the intellisence Dim LS As LanguageSettings Set LS = Application.LanguageSettings nInstall = LS.LanguageID(msoLanguageIDInstall) nDUI = LS.LanguageID(msoLanguageIDUI) bool = LS.LanguagePreferredForEditing(msoLanguageIDFrench Canadian) also perhaps - nCS = application.International(xlCountrySetting) and various other relevant default formatting info that can be changed in say the Normal style of a workbook if necessary. Regards, Peter T "Alex St-Pierre" wrote in message ... Hi, I'm wondering if there's a way to know what is the windows language installed inside the computer where the macro is runned. I tried to find a parameter inside GetLocaleInfo function but all seems to be related to control panel settings. Any idea? Thanks! Alex -- Alex St-Pierre |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to change German language data into Eglish Language in a colum | Excel Discussion (Misc queries) | |||
Windows version language and Excel version language | Excel Programming | |||
language support in excel sheet using a third party language tool | Excel Worksheet Functions | |||
How can I programatically change the language in the language bar? | Excel Discussion (Misc queries) | |||
How to change the excel format from language to language? | Excel Discussion (Misc queries) |