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

ID: Q244514


The information in this article applies to:
  • Microsoft Visual Basic for Applications (VBA) Software Development Kit (SDK), versions 6.0, 6.1


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 : KbVBA kbSDKVBA kbGrpDSO kbDSupport
Version : winnt:6.0,6.1
Platform : winnt
Issue type : kbprb


Last Reviewed: November 17, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.