it's going to blow!

G

Guest

Hi
I have the following code attached to a control button in my xl97 worksheet:

ActiveCell.Activate
ActiveSheet.Unprotect Password:="mypassword"
Cells.CheckSpelling
ActiveSheet.Protect Password:="mypassword", DrawingObjects:=True, _
Contents:=True, Scenarios:=True

This allows staff to spellcheck on our protected documents after completing
their part of the form. The problem is that when activated, the macro calls
up the spellcheck facility, at which point my pc starts heating up and the
fan starts whirring like never before. I'm running Windows XP Pro on a brand
new Compaq P4 2.7Gig with stacks of RAM so I'm sure it's not a resource issue
but I checked the task manager and the cpu usage rockets to 99%. I guess
this is because whilst I'm clicking my way through the spell check, the macro
is open and only finishes once the spellcheck is complete.

Does anyone have any suggestions as to how to prevent this?!
TIA
 
G

Guest

The macro itself would not be using processor time (except for a tiny bit of
overhead) so it must be the spell check itself that is processing so much.
How big is the worksheet? How much text?

For one thing, when you use Cells.CheckSpelling, you are specifying to check
every cell in the sheet. That is 256 x 32000 (roughly) and I don't know that
the spell checker is smart enough to skip blank cells. Can you do any better
at narrowing down the range of cells you are checking? It might help. At
the very least, try specifying ActiveSheet.UsedRange.CheckSpelling and see if
that improves the situation.

And if it does blow, send me a photo!
 

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