Unloading UserForm not working

  • Thread starter Thread starter Marston
  • Start date Start date
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?
 
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.
 
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
 
Back
Top