Click to See Complete Forum and Search --> : Performed a Illegal Operation error


Anne Smith
March 23rd, 2001, 09:17 AM
Does anyone have any idea why when I tried to exit the program in the middle, an illegal operation error message appears everytime. Then I have to close VB and restart it again. I have tried checking for referencing and making sure the references to the dll's, objects are set to nothing after its use. Any ideas?


Anne

shree
March 23rd, 2001, 11:05 AM
In the QueryUnload event of the main form, unload all other forms. This may help. If you have code in the unload event of other forms, check them properly. If you want to track where the cause of the problem is, use the following code in the QueryUnload of the main form:


dim aForm as Form
for each aForm in Forms
MsgBox "Unloading " & aForm.Name
Unload aForm
MsgBox "Unloaded " & aForm.Name " Successfully."
next

swatirs
March 23rd, 2001, 11:27 PM
Also see if the classes or in the code in dlls the database connections or other objects that u might be using are properly closed. Also see if there is any specific sequence of events which leads to this error. Make sure the dlls u r using work properly when tested independently.