Microsoft KB Archive/171822
Article ID: 171822
Article Last Modified on 12/10/2003
- Microsoft Visual Basic 5.0 Control Creation Edition
- Microsoft Visual Basic 5.0 Learning Edition
- Microsoft Visual Basic 5.0 Professional Edition
- Microsoft Visual Basic 5.0 Enterprise Edition
This article was previously published under Q171822
Adding a routine to UserControl while in Break Mode may result in the following error:
Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug has been fixed in Visual Studio 97 Service Pack 2.
For more information on the Visual Studio 97 Service Pack 2, please see the following article in the Microsoft Knowledge Base:
170365 INFO: Visual Studio 97 Service Packs - What, Where, and Why
For a list of the Visual Basic 5.0 bugs that were fixed in the Visual Studio 97 Service Pack 2, please see the following article in the Microsoft Knowledge Base:
171554 INFO: Visual Basic 5.0 Fixes in Visual Studio 97 Service Pack 2
Steps to Reproduce Behavior
This bug is spurious and may be difficult to reproduce.
- Start a new Standard Exe project.
- Select File | Add Project to add an ActiveX Control project. UserControl1 is created by default.
- Select Project | Add User Control to add a second UserControl (UserControl2) to the ActiveX Control project.
- Close UserControl2's design window.
- Place an instance of UserControl2(UserControl21) on UserControl1.
Add the following code to UserControl1's code window:
Private Sub UserControl_Initialize() UserControl21.Test = True End Sub
- Close UserControl1's code and design windows.
- Place an instance of UserControl1 on the Standard Exe's Form1.
- Click Ok to the method or data member not found error. You now in break mode.
- Open the UserControl2's code window.
Type in the following code and hit <Enter>.
Public Function Test ()
The result is that Visual Basic may crash.
Keywords: kbbug kbfix kbvbp500sp2fix kbvs97sp2fix KB171822