Microsoft KB Archive/191207

= BUG: Compile Error When You Reopen a Project That Uses Implements =

Article ID: 191207

Article Last Modified on 5/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 6.0 Learning Edition
 * Microsoft Visual Basic 6.0 Professional Edition
 * Microsoft Visual Basic 6.0 Enterprise Edition

-



This article was previously published under Q191207



SYMPTOMS
When you reopen a project that uses the Implements keyword and that previously ran fine, the following error is received:

Compile error: User-defined type not defined



CAUSE
This problem occurs because Visual Basic incorrectly saves a file and Implements does not work properly.



Steps to Resolve the Problem

 * 1) Select References from the Project menu.
 * 2) Select Microsoft Data Formatting Object Library and the Microsoft Data Source Interfaces.
 * 3) Save the Project.
 * 4) Press F5 to run the project. The above error does not occur.



STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this bug and will post new information here in the Microsoft Knowledge Base as it becomes available.



Steps to Reproduce Behavior
 Start a new ActiveX DLL project in Visual Basic. Class1 is created by default.  In Class1, paste the following code: Implements DataBinding

 In the code window, select the DataBinding object from the Object box. Click the Procedure arrow to view all the Procedures of the DataBinding object. Select each until all the functions are listed in bold. Press F5 to run the Project. The project runs with no error.</li> Save the project files.</li> Close the project.</li> Reopen the project, and press F5 to run it.</li></ol>

RESULTS: The following error occurs:

Compile Error : User-defined type not defined

This error is for:

Private Property Set DataBinding_DataFormat(ByVal RHS As  StdFormat.DataFormat)

- and also -

Private Property Let DataBinding_DataMember(ByVal RHS As  MSDATASRC.DataMember)

Keywords: kberrmsg kbbug kbpending kbcompiler KB191207

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.