Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Screen freeze when running code

Status
Not open for further replies.

Malc8179

MIS
Oct 8, 2007
28
GB
Hi Guys

I have a small issue I'm looping through a very large word document changing certain characters to other characters namely apostrophe to an apostrophe with a carriage return , the code also updates the status bar with progress

The issue I have is the screen freezes not updating the progress on the status bar, the loop is still functioning ok

I have tried adding 'Application.ScreenRefresh' no joy

Any ideas
 
You could add 'DoEvents' (no quotes ofcourse) to your loop. It gives the other processes a little bit more processor time.

---------------------------------------------
Yes, the world is full of strange people.
 
If you are doing a simple Find/Replace ("apostrophe to an apostrophe with a carriage return ") then it would process MUCH faster using Find/Replace, rather than a coded loop.

I do not know what else you are doing, so perhaps a loop is required for some reason. However, using the native Find/Replace functionality is, again, significantly faster than any coded loop.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top