Userform shadows

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
 
T

Tom Ogilvy

You have turned off screen updating when this form is being shown.

Application.ScreenUpdating = False

set it to true before showing the form.
 
P

Pete McCosh

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.
 
G

Geoff

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
 
G

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
 
T

Tom Ogilvy

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

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

Top