Choosing a Locale for your Visual Basic Code

If the appropriate object libraries are installed on your disk and registered with Visual Basic, you can choose to write your Visual Basic module code in a language other than English. You can also specify a corresponding country, thus specifying how you type dates and times and what symbols you use for the list separator, the decimal separator, and so on. The language/country combination sets the locale of your Visual Basic environment — the language in your module code can be different from the language of the Microsoft Excel application. The object library registered when you select a language translates your module code into statements that Microsoft Excel understands.

To choose a language in which to write or edit Visual Basic code

1. On the Tools menu, click Options, and then click the Module General tab.

2. In the Language/Country box, click the language and country you want to use.

If the locale setting you want isn't listed in the Language/Country box, you must install the appropriate object libraries, as explained in "Installing and Registering Object Libraries" later in this appendix.