PRJ: "User-Defined Type Not Defined" Error in MacroLast reviewed: November 24, 1997Article ID: Q145852 |
The information in this article applies to:
SYMPTOMSWhen you try to declare a variable of the type "Database" that is available with the data access object (DAO) library, you may receive the following error message:
User-defined type not defined CAUSEMicrosoft Project can make use of the DAO Object Library that Microsoft Excel and Microsoft Access install. The DAO Object Library defines a variable of the type "Database." The error is generated because there is a hidden module in Microsoft Project called "Database." This module name conflicts with the built-in object type defined by DAO.
RESOLUTIONThis error does not occur if you declare your variable type as "Variant" instead of "Database." For example, instead of using the following declaration:
Dim oData As DatabaseUse the following:
Dim oData as VariantThis error also does not occur if the macro that is being created is stored in a project file (.mpp). To copy a macro from the default storage location of the Global.mpt to a specific project file, use the Organizer within Microsoft Project as follows:
|
Additional query words: 4.00 4.10
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |