ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide Userform (https://www.excelbanter.com/excel-programming/321085-hide-userform.html)

smokiibear

Hide Userform
 
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

Charles Harmon

Hide Userform
 
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

"smokiibear" wrote in message
...
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




Tom Ogilvy

Hide Userform
 
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



--
Regards,
Tom Ogilvy

"smokiibear" wrote in message
...
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

Hide Userform
 
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.

Tom Ogilvy

Hide Userform
 
It pauses the code and lets windows execute pending operations. (like
refreshing the screen).

--
Regards,
Tom Ogilvy


"smokiibear" wrote in message
...
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.





All times are GMT +1. The time now is 12:13 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com