Error Referencing Foreign Language Object LibraryLast reviewed: July 29, 1997Article ID: Q113987 |
The information in this article applies to:
SYMPTOMSIf you use the References dialog box to add a reference to an object library (.OLB) file, such as VBAFR.OLB, in a Visual Basic module that is written in a different language, you receive the following error message:
Object library's language setting incompatible with current project CAUSEThis is by design in Microsoft Visual Basic Programming System, Applications Edition. You cannot reference a object library file in a project that is using a different language. However, when you use the References dialog box to reference an object library file for a different language than the language your project is using, you "register" this object library, even though you receive the error message listed above. Once the different language version of the object library file is registered, you can choose this Language setting from the Module General tab in the Options dialog box and use this language version in any new project. This setting determines the language that is used when you create a new project.
WORKAROUNDTo register a different language version of an object library file and reference this language version in a new Visual Basic project, do the following:
MORE INFORMATIONThe English object library file, VBAEN.OLB, is located in the SYSTEM subdirectory of your Windows directory. The Microsoft Project 4.0 object library file, PROJEN40.OLB, and the Microsoft Excel 5.0 object library file, XLEN50.OLB, are located in the directories in which you installed the respective applications. These object libraries are automatically listed in the References dialog box in Microsoft Project, and in Microsoft Excel, and provide access to the methods and properties in the Microsoft Visual Basic Programming System, Applications Edition and in the individual applications. Note that a Visual Basic module cannot have references to two different language versions of the Visual Basic object library or the application object library. The referenced languages must correspond to the Language/Country setting for the module. You can, however, reference a project using one language from a project written in another language.
REFERENCES"Visual Basic User's Guide, Microsoft Excel," version 5.0, pages 281-286 Keywords : kberrmsg kbprg Version : 1.00 Platform : WINDOWS |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |