View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
theSquirrel theSquirrel is offline
external usenet poster
 
Posts: 27
Default UserForm Not Hiding

On Nov 28, 1:13 pm, Mike H. wrote:
I have a userform. Before I hide it, I do this:
Application.ScreenUpdating = True
Application.EnableEvents = True
Then do this:
UserForm1.Hide
But the form does NOT "hide" until way later. Ideas?

Is there a "screen refresh" command or something like that. I have not had
this problem before.


To answer your question, no... I don't think there is any other
screen refresh other than 'Application.ScreenUpdating = True'. There
is a UI refresh called with 'UserForm1.Repaint'.

I would try 2 things... first, i would put an additional
'Application.ScreenUpdating = True' right before the 'UserForm1.Hide'
statement and see if taht works... Next, if that doesn't work, I
would put a repaint in front of the hide statement. It sounds like
there is some intense processing going on in the back and Excel can't
update the screen before you want it to.

I hope that helps.

theSquirrel