closing userforms
The normal practice is to have an OK and a Cancel button on a form. Cancel
unloads without hesitation, OK might do some saving of data.
If you want to call another form (say Form2) from your button (in say
Form1), showing Form2 in itself does not unload Form1, you have to
explicitly do it. But you need to unload Form1 before you show Form2, else
it will wait for Form2 to unload in its turn before Form1 unloads.
Unload Me
UserForm2.Show
--
HTH
RP
(remove nothere from the email address if mailing direct)
wrote in message
oups.com...
what is the best method of closing a userform,, i know you can use the
unload userform, but wheres the best place to put this.
i have a form with a few commands buttons on it. from the command
buttons i only use the call function
i.e call nextsub
then the first line of code within this sub would be unload userform1.
also i would open another form at the end of this sub using the
userform2.show. Is this enough to ensure userform1 is closed
john
|