How do you add code to your commandbutton, so that after it has performed
it's request, it closes the Userform?
I tried the unload command, like in Access, but I maybe don't have the
syntax right...
thanks
Southern@Heart
Shauna Kelly - 03 Feb 2008 05:55 GMT
Hi
Within a form,
Me.Hide
will hide the form. You need to unload it later.
Within a form,
Unload Me
will unload the form from memory.
Or, in a standard module or a class module, you can create a variable to
hold an instance of the form, eg:
Dim frm as MyUserForm
set frm = new MyUserForm
frm.Show
'let the form do its stuff.
'have the OK button do Me.Hide
'back in the main module
Unload frm
Hope this helps.
Shauna Kelly. Microsoft MVP.
http://www.shaunakelly.com/word
> How do you add code to your commandbutton, so that after it has
> performed
[quoted text clipped - 3 lines]
> thanks
> Southern@Heart