Hide Userform

  • Thread starter Thread starter smokiibear
  • Start date Start date
S

smokiibear

I am trying to hide a userform. I've have tried unloading the form and
hiding the form, both with screen updating = true; neither has worked form
me.

However, when i manually step through the program, the userform indeed DOES
hide...so, i imagine that the problem is during execution, the screen never
has a chance to catch up with the code.

Any more ideas how to handle this?

Smokii
 
smokiibear,
If possible post your code so we can see it. Or if you want you can E-Mail
me and I'll look at it.
Charles
(e-mail address removed)
 
With screenupdating set to true, I have never had a problem with unloading
or hiding a userform.

Throw in a doevents if you think the screen needs to catch up.


Application.ScreenUpdating = True
Userform1.Hide
DoEvents
 
Throw in a doevents if you think the screen needs to catch up.

Thanks, Tom. I tried using a doevents earlier, but i didn't (and still
don't) understand its purpose. Anyhow, I tried it again, and now it seems
to work well.

thanks

Smokii

Ps. if you could elaborate on this function, i'd like to understand it
better. again, thanks.
 
It pauses the code and lets windows execute pending operations. (like
refreshing the screen).
 

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

Back
Top