Microsoft KB Archive/172676

= PRB: Autolist Feature Breaks When Project Cannot Compile =

Article ID: 172676

Article Last Modified on 2/16/2005

-

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 Q172676



SYMPTOMS
In the Visual Basic Development Environment, the Autolist feature does not work for Class or Standard Module objects.



CAUSE
This problem may occur when two Enum structures have the same name within a project. The project cannot be compiled under these circumstances; you receive the following error when the project compiles:

Compile Error: Ambiguous Name Detected:



RESOLUTION
Resolve the ambiguous name by renaming one of the Enum structures. If you are unsure if this is the cause of the problem, select Start With Full Compile from the Run menu. If you receive an "Ambiguous Name Detected" error, check your code for the name listed in the error message.



STATUS
This behavior is by design.



Steps to Reproduce Behavior
 Create a new "Standard EXE" project in Visual Basic. Add a form, two class modules, and a standard module.  Add the following code to the General Declarations section of Module1: Public Sub modulesub

End Sub   Add the following code to Class1: Public Enum test a = 1 b = 2 c = 3 End Enum

Public Sub classonesub

End Sub   Add the following code to Class2: Public Enum test a = 1 b = 2 c = 3 End Enum

Public Sub classtwosub

End Sub </li>  In the Click event of Form1, add the following code: Dim c1 As New Class1 Dim c2 As New Class2 ' test code here </li>  In the Click event of Form1, try adding code that normally causes the Autolist feature to display. You must type the following entries; do not cut and paste. For example: c1. c2. Module1. Note that after you type the period, the Autolist feature is not invoked as expected. </li></ol>

Additional query words: kbVBp500 kbVBp600 kbVBp kbdsd kbDSupport KBCOMPILE KBIDE

Keywords: kbide kbprb kbpending KB172676

-

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

© Microsoft Corporation. All rights reserved.