Cancel and Reset UserForm and macros

D

DStrong

OK, this seems like it should not be that big of a deal, but I am going crazy
trying to figure this out. I am running Outlook 2003 on XP Pro machine. I
have created a userform that functions in all ways as it should, except when
the function of the form is done or if the user hits the cancel button.

I first had userform1.hide, that got rid of the form, but did not seem to
reset things in the VBA side of things. I then tried, reset, quit, terminate,
close. I have look up on MSND with no luck, googled this still no luck. I
have Sue Moshers book on programming and cannot find what I need to do this.

What I want to happen is the same thing that happens when in VBA and I click
the STOP(Reset) control button.

Is there a command line that I need to make this work? Or does this just not
matter? Please help, I am pulling my hair out. j/k
 
K

Ken Slovak - [MVP - Outlook]

UserForm1.Hide() just make the form not visible. Any code on the form would
continue to run. You probably want to use Unload UserForm1 instead, which
will terminate the form.
 
D

DStrong

Ken you are the best! Thank you, I will not be going bald after all. Good day
to you.
 
C

Chris Malter

Ken, you rock. I've been trying to figure this one out for a while. If only
Microsoft was consistent with VBA and VB, I could have just found the close
method and used me.close. Ah well. At least we have experts like you.
 
Top