Userform shadows

  • Thread starter Thread starter Geoff
  • Start date Start date
G

Geoff

Hi,
I deploy five userforms in an MS 2002 wbook. When using
four of them I can grab the title bar and move the form
around the screen to uncover hidden data except for one.
When grabbed and moved this form leaves an image behind
which can obscure the whole screen if moved
sufficiently. Looking at their properties I cannot see
any obvious differences.
Does anyone have any ideas how I might prevent this.

Grateful for any help.

T.I.A.
Geoff
 
You have turned off screen updating when this form is being shown.

Application.ScreenUpdating = False

set it to true before showing the form.
 
Geoff,

I find this often happens with dialogue boxes, etc when
there's a lot of processing going on in the background,
e.g. Find and replace over multiple sheets.

Do you have any code associated with this form which could
be running while you're trying to move it?

Pete.
 
Pete,
No, I call them from screen command buttons linked to a
macro, at that stage there is no other code running.

What I have found since is a bit different to my original
statement- at first only the one form (second in the
list) seemed to be affected. Now it is every form
excepting the first, this never leaves a trailing image.

Intriguingly, with a bit of experimentation, I have found
the forms causing the problem do not leave a trailing
image if they are run from the VBE. When called from the
screen they always do.

Any further ideas?

Geoff
 
Tom,
You are so right.

As you replied, I had just established the form moved ok
when called from VBE. I was trying to figure out the
difference between calling from a macro and calling from
VBE. It was the of course the macro calling the form
which had screenupdating turned off.

Thanks for making the link.

Geoff
 
The cause is that you have ScreenUpdating set to false when the forms are
being displayed.
 
Back
Top