Microsoft KB Archive/190200

= BUG: Name Conflict Error Even After Renaming Module =

Article ID: 190200

Article Last Modified on 5/13/2003

-

APPLIES TO


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

-



This article was previously published under Q190200



SYMPTOMS
In a Microsoft Visual Basic project, when you give the same name to an Enum and a class module and run the project, you will get the following error:

Compile error: Name conflicts with existing module, project or object library

However, after you resolve the name conflict by changing the name of the class module, the same error still occurs when you run the project.



CAUSE
Visual Basic does not rebuild the binding table upon the name change. Therefore, the change is not reflected in the system and the conflict persists.



RESOLUTION
You need to make a few changes to the project (for example, add some code to the modules) or reload the project to workaround this error.



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
 Open a new ActiveX DLL project in Visual Basic. Class1 is created by default.  Paste the following code into the code window of Class1: Public Enum t1        red End Enum  Select Add Class Module from the Project menu and add another class module to the current project. Rename Class2 to t1 using the Properties window. Press the F5 key to run the project. The following error will occur:

Compile error: Name conflicts with existing module, project or object library

</li> Rename the class module t1 back to Class2.</li> Press the F5 key to run the project again. Note that the same error message still occurs despite the fact that the names are no longer in conflict.</li></ol>

Additional query words: kbDSupport kbdss kbVBp500bug kbVBp600bug kbVBp kbCompiler

Keywords: kbbug KB190200

-

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

© Microsoft Corporation. All rights reserved.