Hiding Userforms

  • Thread starter Thread starter CeeKay
  • Start date Start date
C

CeeKay

Often in some of the workbooks I've built, a modal userform will continue to
be visible even while the code processes. I'm trying to pin this down. Is
it due to where in the code I turn screenupdating off or where the ".hide"
statement appears? Or is it something else? I suspect I need to make sure
I "hide" the form before turning off screenupdating. Does where the "hide"
statement occurs have any bearing? IOW does that need to be in one of the
events of the form or in the main module?
 
Hi,

Have you tried......Unload Userform1 in the Private Su
ComboBox1_Change() module or Userform1.Hide in the Private Su
CommandButton1_Click() module? or in the Private Sub TextBox1_Change(
module you could use Unload Me .

Hope these help!

Simon
 
Try using
Application.screenupdating = true

to clear the image of the form. Then set to false with another statement to
hide screen activity. What you are seeing is a "ghost" image that Excel has
not had time to clear.

Robert Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 

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