Microsoft KB Archive/172676

From BetaArchive Wiki
< Microsoft KB Archive
Revision as of 11:06, 21 July 2020 by X010 (talk | contribs) (Text replacement - """ to """)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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: <name>

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.
  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 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.



Additional query words: kbVBp500 kbVBp600 kbVBp kbdsd kbDSupport KBCOMPILE KBIDE

Keywords: kbide kbprb kbpending KB172676