Archive of Mr Excel Message Board

Back to Excel VBA archive index
Back to archive home

Does not recognize Unload Userform1
Posted by Paul Magruder on April 11, 2001 4:15 AM
I have a UserForm with several command buttons on it that are used to navigate between several open workbooks. I am using the userform as a "Links Page".
Tha problem is that the word "Unload" is not recognized in the code. It will recognize UserForm1.hide, but not "Unload". I have several other workbooks wiith Userforms that I "Unload" without any problem. Excel 97 with Windows NT....
Any Suggestions?
Thanks in advance
Paul Magruder

| Check out our Excel VBA Resources
|
 |
 |
 |
 |
 |
Re: Does not recognize Unload Userform1
Posted by Dave Hawley on April 11, 2001 5:35 AM
Hi Paul
This is strange! How are you using the command. It should be:
Unload UserForm1
if the code is housed outside of the UserForms Private module.
..OR
Unload Me
If the code is within the UserForms Private module.
DaveOzGrid Business Applications

Re: Does not recognize Unload Userform1
Posted by Paul Magruder on April 11, 2001 6:00 AM
The Code is in a Private Sub. It will not reconize the word "Unload"?????

Re: Does not recognize Unload Userform1
Posted by Dave Hawley on April 11, 2001 6:09 AM
Paul
Type: unload me
Exactly as shown (all lower case) does Excel automatically captilize it to read:
Unload Me
Dave
OzGrid Business Applications

Re: Does not recognize Unload Userform1
Posted by Paul Magruder on April 11, 2001 6:13 AM
It just captilizes the "Me"

Re: Does not recognize Unload Userform1
Posted by Dave Hawley on April 11, 2001 8:14 AM
Paul, Exporting the UserForm to your hard drive, Save the file, Import it back in again and rename it then Save agian.
If that doesn't help copy all controls on the UserForm to a new one, then copy over the ciode for all Controls.
If still no good try inserting a new userform and see if the Unload is recognised. You can send me the file if you like, but I wont be able to look at it for 7 hours.
DaveOzGrid Business Applications

Re: Does not recognize Unload Userform1
Posted by Paul Magruder on April 11, 2001 11:33 AM
If that doesn't help copy all controls on the UserForm to a new one, then copy over the ciode for all Controls. If still no good try inserting a new userform and see if the Unload is recognised. You can send me the file if you like, but I wont be able to look at it for 7 hours.
Dave,
Tried eveything you suggested.. still won't reconize "Unload"..... I wish I could send you the file but it has links to the network with classifed info...Thanks for all your help...
This time & all the other times....
Thanks
Paul

This archive is from the original message board at www.MrExcel.com.
All contents © 1998-2004 MrExcel.com.
Visit our
online store to buy searchable CD's with thousands of VBA and Excel answers.
Microsoft Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.