Microsoft KB Archive/76514

= BUG: Duplicate Procedure Name Alters Original Capitalization =

Article ID: 76514

Article Last Modified on 12/12/2003

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Standard Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Visual Basic 1.0 Standard Edition

-



This article was previously published under Q76514



SYMPTOMS
If you enter a Sub statement with a procedure name that duplicates an existing procedure name in spelling but not in capitalization, you will receive a &quot;duplicate definition&quot; error message, but the original procedure name will be changed to match the new capitalization. This also happens if you choose New Procedure from the Code menu and enter a duplicate name.



STATUS
Microsoft has confirmed this to be a bug in Visual Basic versions 1.0, 2.0, and 3.0 for Windows. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.



MORE INFORMATION
If you choose the OK button after receiving the &quot;duplicate definition&quot; error message, the old name of the subroutine will be updated to show the changes in capitalization, even though there was a &quot;duplicate definition&quot; message.

Method 1

 * 1) Within a module, create a Sub procedure called &quot;a&quot;.
 * 2) From the Code menu, choose New Procedure. Name the procedure &quot;A&quot; and choose the OK button when the &quot;duplicate definition&quot; message is displayed.

Method 2

 * 1) Within a module, create a Sub procedure called &quot;a&quot;.
 * 2) Within the same module, create a Sub named &quot;A&quot; and choose the OK button when the &quot;duplicate definition&quot; message is displayed.

The original procedure name is updated with the most recent Sub procedure name taking the place of the old Sub procedure name, despite the &quot;duplicate definition&quot; error message. To work around the problem, change the capitalization.

Additional query words: buglist1.00 buglist2.00 buglist3.00 2.00 3.00

Keywords: kbbug KB76514

-

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

© Microsoft Corporation. All rights reserved.