Microsoft KB Archive/244514

= PRB: Controls and Macros Cannot Have the Same Name in VBA =

Article ID: 244514

Article Last Modified on 11/19/1999

-

APPLIES TO


 * Microsoft Visual Basic for Applications (VBA) Software Development Kit (SDK) 6.0
 * Microsoft Visual Basic for Applications (VBA) Software Development Kit (SDK) 6.1

-



This article was previously published under Q244514



SYMPTOMS
If a Visual Basic for Applications (VBA) project has a control and a macro with the same name, and the user tries to run the macro using the Macro's Dialog, an unspecified error might result and the file containing the project might be corrupted.



CAUSE
This problem occurs because VBA cannot differentiate between the macro and the control. This results in a error message and unpredictable behavior.



RESOLUTION
Macros and controls must not have the same name in a VBA project.

Additional query words: VBASDK

Keywords: kbprb KB244514

-

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

© Microsoft Corporation. All rights reserved.