#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 89
Default Userform.

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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Userform.

I'm trying to think of a good reason for even applying ScreenUpdating to a
UserForm?

"Bill" wrote:

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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default Userform.

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)

"Bill" wrote in message
ink.net...
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Userform.

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

--
Regards,
Tom Ogilvy

"Bill" wrote in message
ink.net...
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



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Userform.

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
--
kataiwo


"Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy

"Bill" wrote in message
ink.net...
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






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Userform.

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

--
Regards,
Tom Ogilvy


"kataiwo" wrote in message
...
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
--
kataiwo


"Tom Ogilvy" wrote:

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

--
Regards,
Tom Ogilvy

"Bill" wrote in message
ink.net...
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Userform to enter values and shown in same userform in list helmekki[_104_] Excel Programming 0 November 19th 05 03:23 PM
Looping procedure calls userform; how to exit loop (via userform button)? KR Excel Programming 6 July 27th 05 12:57 PM
Activating userform and filling it with data form row where userform is activate Marthijn Beusekom via OfficeKB.com[_2_] Excel Programming 3 May 6th 05 05:44 PM
Access from add_in userform to main template userform.... Ajit Excel Programming 1 November 18th 04 05:15 PM
Linking userform to userform in Excel 2003 missmelis01 Excel Programming 2 August 27th 04 08:07 PM


All times are GMT +1. The time now is 07:49 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"