|
-
Jan 6th, 2000, 07:27 PM
#1
Thread Starter
Lively Member
Hi, everybody!
When I try to unload a form, I see the following message:
Run-time error ‘361’ Can’t load or unload this object
I’m using the "on click" event of a button, with this command:
Unload MyformName
In fact, I can only close the form by clicking on the control bar.
The MSDN help says that this error is caused when you try load or unload:
a) an object that isn’t a loadable object
b) an existing control that isn't part of a control array. For example, assuming that a TextBox with the Name property Text1 exists, Load Text1 will cause this
c) a Menu control in the Click event of its parent menu.
d) the last visible menu item of a Menu control.
But I guess all of these alternatives are inadequate in my case!
Thanks in advance for any help,
Roselene
-
Jan 6th, 2000, 08:50 PM
#2
Addicted Member
Try to use this line of code instead of your line:
Unload Me
Maybe there is a problem with calling Unload in a form with that form's name.
Good Luck!!!
-
Jan 6th, 2000, 09:40 PM
#3
Thread Starter
Lively Member
Forest,
I've changed the command to Unload Me and it works!
I guess it's strange, cause I have tried to copy the Form name from its name property to the module before, in order to be sure that its name was correctly, and it hasn't work.
Why it happens?
Thanks very much for the help!
Roselene
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|