Unloading UserForm not working

M

Marston

Can anyone think of why this generic code doesn't seem to alway unload a userform?

UserFormn.Hide
Unload UserFormn
UserFormm.Show

where n and m are numbers for the Userforms.....

Seems odd to me? Could it be a memory thing?
 
T

Tom Ogilvy

I suspect you are unloading it in an event for that form. The form can't
unload if the event is still operating - perhaps because you are showing
another modal form. When the code finishes executing/the event is
completed, then it will unload.
 
N

NickHK

Marston,
You mean that "n" & "m" are variables and you trying to use this routine to
allow manipulation of multiple UserForms, named UserForm1, UserForm2,
UserForm3,... etc ?

NickHK
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top