Article ID: 126221 - Last Review: November 18, 2003 - Revision: 2.0 BUG: (CDK) Cannot Use an Underscore in a Custom Event NameThis article was previously published under Q126221 On This PageSYMPTOMS
A custom Event containing an underscore character (_) as part of the
Event's name will not fire, and it produces duplicate code in the Microsoft
Visual Basic Development Environment.
Also, if code is placed in the custom event that has an underscore in its name, a duplicate of the event code will appear in the general section of the IDE. CAUSE
If an underscore is present in an event's name, the return value from a
call to VBFireEvent will be Zero, but the custom event will not be
triggered in Visual Basic. This is because the underscore prevents Visual
Basic from finding the name of the event in the event list.
The reason for the duplicate code is that Visual Basic is unable to match the code with the event for that control due to the underscore in the event name. WORKAROUND
Do not use the underscore character as part of the name of a custom event.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this problem and will
post new information here in the Microsoft Knowledge Base as it becomes
available.
MORE INFORMATIONSteps to Reproduce Problem
APPLIES TO
| Article Translations
|


Back to the top
