LanguageID Property

Microsoft Office Visual Basic

Returns the locale identifier (LCID) for the install language, the user interface language, or the Help language. Read-only Long.

expression.LanguageID(Id)

expression    Required. An expression that returns a LanguageSettings object.

Id   Required MsoAppLanguageID.

MsoAppLanguageID constant Meaning
msoLanguageIDExeMode The language mode that the application is using. This setting applies only to Microsoft Excel and Microsoft Access. This setting affects languages that can be displayed and edited, available language-specific features, number styles, currency settings, and so forth.

If none of the languages supported by Excel and Access are used, the host application will not be configured to support right-to-left and East Asian languages. The supported languages are as follows:

  • Arabic
  • Farsi
  • Hebrew
  • Japanese
  • Korean
  • Simplified Chinese
  • Traditional Chinese
  • Urdu
  • Yiddish
msoLanguageIDHelp The language used for online Help.
msoLanguageIDInstall The language settings used by Microsoft Office to set up defaults. For example, Microsoft Word uses this setting to determine the layout of toolbars and the default types of bullets and numbers on a language-by-language basis.
msoLanguageIDUI The language used by the host application's user interface.
msoLanguageIDUIPrevious The language setting for the user interface when a given computer was last rebooted. A program or add-in can use this to determine whether the user interface language has changed.

Example

This Microsoft Excel example checks the LanguageID property settings for the user interface and execution mode to verify that they are set to the same LCID. The example returns an error if there is a discrepancy.

If Application.LanguageSettings.LanguageID(msoLanguageIDExeMode) _
    <> Application.LanguageSettings.LanguageID(msoLanguageIDUI) _
    Then MsgBox "The user interface language and execution " & _
    "mode are different."