Using Object Libraries to Make Your Code Transportable

During installation, Microsoft Excel registers the English object libraries as the default libraries, regardless of the language version of Microsoft Excel. However, if you install the appropriate Visual Basic object library in your Windows system folder and the corresponding Microsoft Excel object library in your Microsoft Excel program folder, you can write your Visual Basic code in a language other than English. Your code language can be different from the language of the Microsoft Excel application because the object library translates your code into statements that can run in any language version of Microsoft Excel.

Important

You cannot transport code written on a system that's set up for a Far Eastern double-byte character system (DBCS) language to a system that's not similarly set up, unless the code is written in English.

Object libraries provide lexical information that Microsoft Excel uses to determine how to work with dates, times; and number separators.

With object libraries, you can write your code in a way that's familiar to you, and users in other countries can run your code in a way that's familiar to them. For example, if the decimal separator in your locale is the period, you'll want to use it when you type numbers in code. If another symbol, such as the comma, is the decimal separator in your user's locale, you'll want it to appear when your code displays numbers. And you want your code to interpret the comma correctly when a user enters a number in a cell or dialog box. Object libraries make this possible.