FIX: FIX: Error Picking Deleted Object From Dropdown ListID: Q223107
|
A class module in a Standard EXE project contains a declaration for a public event. A form in the Standard EXE project instantiates an object variable based on the class module with the WithEvents keyword. When you delete the declaration statement for the object variable in the code window of the form and select the object variable from the object box of the code window, an application error occurs.
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This bug was corrected in Visual Studio 6.0 Service Pack 3.
For more information about Visual Studio 6.0 Service Packs, please see the following articles in the Microsoft Knowledge Base:
Q194022 INFO: Visual Studio 6.0 Service Packs, What, Where, Why
Q194295 HOWTO: Tell That Visual Studio 6.0 Service Packs Are Installed
This section shows you how to create a sample project that demonstrates the bug behavior. The section assumes you are familiar with adding a class module to a Standard EXE project and instantiating the COM object from that Class module. If you are not familiar with these tasks, see the REFERENCES section for more information on these tasks.
Option Explicit
Public Event MyCustomEvent()
Option Explicit
Private WithEvents X As Class1
Private WithEvents X As Class1
For more information about form, standard, and class modules, please see the following:
Additional query words:
Keywords : kbservicepack kbActivexEvents kbVBp600bug kbGrpVB kbVS600sp2 kbVS600SP1 kbVS600sp3fix
Version : WINDOWS:6.0
Platform : WINDOWS
Issue type : kbbug
Last Reviewed: May 20, 1999