Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2007

Tip: Looking for answers? Try searching our database.

Form repaint problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Benjamino5 - 11 Sep 2007 22:12 GMT
I have a VBA form to provide the user with status on a long-running macro.
Normally, the status updates happen every few seconds without error.

Sometimes, however, the form doesn't update at all, and can even generate a
"(Not Responding)" error in the form's title bar. The macro completes
successfully, but the user thinks it's frozen.

I'm calling form.Repaint after I update the status text. Why might that be
working some of the time and not all of the time? It does seem to be related
to switching from Word to another app and back again, but it's not consistent.

I've also heard of the DoEvents command, to yield control to the OS, but
I've seen conflicting advice about how and when to use that.

Any suggestions? I can provide code samples, but really, I'm just updating
the text in the form and then calling .Repaint.

Thanks,
Ben
Doug Robbins - Word MVP - 12 Sep 2007 08:18 GMT
Fellow MVP/Bill Gates look-alike, Albert Kallal has a status bar routine in
his website at:

http://www.members.shaw.ca/AlbertKallal/wordmerge/index.html

I have used that successfully in a number of applications.

Signature

Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

>I have a VBA form to provide the user with status on a long-running macro.
> Normally, the status updates happen every few seconds without error.
[quoted text clipped - 18 lines]
> Thanks,
> Ben
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.