Thanks problem solved
Printable View
Thanks problem solved
linguist
Your question is rather ambiguous. Could you
explain a little further what you are trying to do.
Spoo
Thanks problem solved
linguist
Ah.. so, you want to use VB6 to do this..
Start
> Programs
> Microsoft Office
> Microsoft Office Tools
> Microsoft Office 200x Language Settings
.. then extract default setting from appropriate tab.
Unfortunately, I don't know how.
Hopefully someone else does.
Spoo
in excel or word
msgbox Application.LanguageSettings.LanguageID(msoLanguageIDInstall)
will return the language id 1033 = us english
you would need to get the language from the id
or
vb Code:
Dim lang As MsoLanguageID lang = Application.LanguageSettings.LanguageID(msoLanguageIDInstall)
In VB6vb Code:
ption Explicit Private Const LOCALE_USER_DEFAULT = &H400 Private Const LOCALE_SNATIVELANGNAME = &H4 Private 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 Private Function GetInfo(ByVal lInfo As Long) As String Dim Buffer As String, Ret As String Buffer = String$(256, 0) Ret = GetLocaleInfo(LOCALE_USER_DEFAULT, lInfo, Buffer, Len(Buffer)) If Ret > 0 Then GetInfo = Left$(Buffer, Ret - 1) Else GetInfo = vbNullString End If End Function Private Sub Command1_Click() MsgBox GetInfo(LOCALE_SNATIVELANGNAME) End Sub