Hi
I need to know how to get the language version of MS Excel. Can anyone help me?
Thanks in advance
Hi
I need to know how to get the language version of MS Excel. Can anyone help me?
Thanks in advance
It is an OS setting, so I think it would be tricky.
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
This might do it for you
[vba]
Public Const LOCALE_SENGLANGUAGE As Long = &H1001
Public Declare Function GetSystemDefaultLCID Lib "kernel32" () As Long
Public Declare Function GetLocaleInfo Lib "kernel32" Alias "GetLocaleInfoA" ( _
ByVal Locale As Long, _
ByVal LCType As Long, _
ByVal lpLCData As String, _
ByVal cchData As Long) As Long
Public Function GetUserLocaleInfo(ByVal dwLocaleID As Long, _
ByVal dwLCType As Long) As String
Dim sReturn As String
Dim r As Long
r = GetLocaleInfo(dwLocaleID, dwLCType, sReturn, Len(sReturn))
If r Then
sReturn = Space$(r)
r = GetLocaleInfo(dwLocaleID, dwLCType, sReturn, Len(sReturn))
If r Then
GetUserLocaleInfo = Left$(sReturn, r - 1)
End If
End If
End Function
Sub testit()
MsgBox GetUserLocaleInfo(GetSystemDefaultLCID(), LOCALE_SENGLANGUAGE)
End Sub
[/vba]
____________________________________________
Nihil simul inventum est et perfectum
Abusus non tollit usum
Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
James Thurber
Thanks a lot xld. It works.