Trouble with Unload statement in VBA

255 pts.
Tags:
default settings
Microsoft Excel 2003
unload statement
userforms
VBA
What am I missing?

I have written code with an Unload Userform statement that doesn't seem to wipe out the Userform from memory.

For Ex: (Default: CheckBox1.Value = False)

MyForm.Show


CheckBox1.Value = True


Unload MyForm


MyForm.Show


So, the form is shown to the user, and they mark CheckBox1 so the value now equals True. The form is then unloaded, but when it is shown to the user again CheckBox1 is still marked.  If I write the Unload statement into the code, shouldn't the form be shown the next time with all default values in place (i.e. CheckBox1 = False)?

Resetting the value of a CheckBox is a simple task, but when the forms incorporate ComboBox(es), TextBoxe(es), ListBox(es)...and on, and on, how can the form be reset to all default values the next time it is shown if the Unload statement doesn't work?  I've tried repaint as well.

Hope this makes sense!

Thanks



Software/Hardware used:
Excel 2003

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following