DOCUMENT:Q172676 13-AUG-1997 [vbwin] TITLE :PRB: Autolist Feature Breaks When Project Cannot Compile PRODUCT :Microsoft Visual Basic for Windows PROD/VER:WINDOWS:5.0 OPER/SYS:WINDOWS KEYWORDS:vb5all ====================================================================== --------------------------------------------------------------------- The information in this article applies to: - Microsoft Visual Basic Learning, Professional, and Enterprise Editions for Windows, version 5.0 --------------------------------------------------------------------- SYMPTOMS ======== In the Visual Basic 5.0 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 will 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. MORE INFORMATION ================ Steps to Reproduce Behavior --------------------------- 1. Create a new "Standard EXE" project in Visual Basic 5.0. 2. Add a form, two class modules, and a standard module. 3. Add the following code to the General Declarations section of Module1: Public Sub modulesub() End Sub 4. Add the following code to Class1: Public Enum test a = 1 b = 2 c = 3 End Enum Public Sub classonesub() End Sub 5. Add the following code to Class2: Public Enum test a = 1 b = 2 c = 3 End Enum Public Sub classtwosub() End Sub 6. In the Click event of Form1, add the following code: Dim c1 As New Class1 Dim c2 As New Class2 ' test code here 7. In the Click event of Form1, try adding code that normally causes the Autolist feature to display. You must type the entries below; do not cut and paste. For example: Class1. Class2. Module1. Note that after you type the period, the Autolist feature is not invoked as expected. ====================================================================== Keywords : vb5all Version : WINDOWS:5.0 Platform : WINDOWS Issue type : kbprb ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1997.