Export (0) Print
Expand All
Expand Minimize

OLEDBConnection.LocaleID Property (Excel)

Returns or sets the locale identifier for the specified connection. Read/write

Version Added: Excel 2010

expression .LocaleID

expression A variable that represents an OLEDBConnection object.

Return Value

Integer

Before you set the LocaleID property to a new locale, you must set the RetrieveInOfficeUILang property of the OLEDBConnection object to False. For more information about valid Locale ID (LCID) values, search the MSDN Web site for "Locale IDs Assigned by Microsoft".

The following code example switches the language of the connection to Spanish.

Dim myConnection As OLEDBConnection 
Set myConnection = ThisWorkbook.Connections(1) 
 
With myConnection 
 .RetrieveInOfficeUILang = False 
 .LocaleID = 3082 
End With
Show:
© 2014 Microsoft