Microsoft KB Archive/244045

= PRB: Public Identifiers in Type Libraries May Not Have Leading Underscores in VBA =

Article ID: 244045

Article Last Modified on 11/19/1999

-

APPLIES TO


 * Microsoft Visual Basic for Applications (VBA) Software Development Kit (SDK) 5.0
 * 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 Q244045



SYMPTOMS
If the type information of an ActiveX Control contains public identifiers with leading underscores, and that control is added to a VBA-enabled application, Visual Basic for Applications (VBA) macros might not run or VBA might crash.

For example, the following enumeration in a control's type library may cause problems: typedef enum _Names{ Bob, John, Sally } Names;



CAUSE
This problem occurs because leading underscores in VBA have special meaning.



RESOLUTION
To correct this problem, all underscores in the type library of the control should be removed. For example, the previous enumeration can be changed to the following: typedef enum tagNames{ Bob, John, Sally } Names;



STATUS
This behavior is by design.

Keywords: kbprb KB244045

-

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

© Microsoft Corporation. All rights reserved.