Userform.

B

Bill

Hello,
I have the code given below to show a userform. When the userform comes up,
I can select and move it around the screen. But it keeps its image at each
location, so it is like there are hundreds of userforms on the screen if I
keep moving it around. I thought turning the screen updating to true would
prevent that. Any thoughts?

Application.ScreenUpdating = True
CHUpdate.Show
CHUpdate.Hide
Application.ScreenUpdating = False

Thanks,

Bill
 
B

Bob Phillips

Here is a post from Andy Pope that MIGHT help

Activating cells on a hidden sheet whilst the userform is displayed will
cause ghosting if you move the userform.

I suggest you confirm this by simply making the sheet visible and then
move your userform around. If the problem goes away you will need to
alter your code. You can still reference and use the cells on the hidden
sheet just not activate them. Most tasks do not require you to activate
the cells in order to manipulate them.


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)
 
T

Tom Ogilvy

That should solve the problem. This problem is usually caused by
ScreenUpdating being set to false.
 
G

Guest

I think the problem is because the form is shown modal by default and because
of this, your code actually stalls at the point you show the form. Showing
the form modeless should solve the problem as below:
myform.show vbmodeless
 
T

Tom Ogilvy

If you want to show it modal, then turning on screenupdating will solve the
problem in my experience.
 

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