The xxxLocal Properties

Up until now, you have had to interact with Excel using English-language functions and the default U.S. formats. Presented now is an alternative situation, where your code interacts with the user in his or her own language using the appropriate regional settings. How, then, can your program take something typed in by the user (such as a number format or formula) and send it straight to Excel, or display an Excel formula in a message box in the user's own language?

Microsoft has anticipated this requirement and has provided us with local versions of most of the functions we need. They have the same names as their U.S. equivalents, with the word "Local" on the end (such as FormulaLocal, NumberFormatLocal, and so on). When you use these functions, Excel does not perform any language or format coercion for you. The text you read and write is exactly how it appears to the user. Nearly all of the older functions that return strings, or have string arguments, have local equivalents; newer objects do not. The following table lists all of the xxxLocal properties and the objects to which they apply.

Applies to

Return strings according to U.S. number and date formats and English text

Use and return locally formatted strings, and in the language used for the Office UI (or Windows version)

Number/string conversion



Number/string conversion


CDbl, and so on

Name, Style, CommandBar



Range, Chart Series



Range, Chart Series



Range, Style, Chart Data Label, Chart Axes Label









Defined Name



Defined Name



Defined Name



0 0

Post a comment