Consulting

Results 1 to 4 of 4

Thread: how to get the language installation

  1. #1

    how to get the language installation

    Hi

    I need to know how to get the language version of MS Excel. Can anyone help me?

    Thanks in advance

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    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

  3. #3
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    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

  4. #4
    Thanks a lot xld. It works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •