disable spell check pop-up message

G

Guest

I created a macro that sets a range within my worksheet. After the proper
range has been set, I run ActiveCell.CheckSpelling. This works fine. Since
I am not checking the spelling of the entire worksheet, the user is prompted
with a message to see if they would like to check the spelling from the
beginning. Is there anyway to turn this off (other than spell check of the
entire worksheet)?
 
R

Rob Bovey

Greg said:
I created a macro that sets a range within my worksheet. After the proper
range has been set, I run ActiveCell.CheckSpelling. This works fine.
Since
I am not checking the spelling of the entire worksheet, the user is
prompted
with a message to see if they would like to check the spelling from the
beginning. Is there anyway to turn this off (other than spell check of
the
entire worksheet)?

Hi Greg,

When you run the CheckSpelling method from a single cell, VBA
automatically assumes you want to spell-check the whole worksheet
(consistent with the way spell checking works in the UI).

The way I get around this is to select an empty cell in addition to the
cell I'm trying to spell-check and then run the CheckSpelling method on
these two cells. Since the empty cell is empty it has no effect, and since
the CheckSpelling method is being run on multiple cells it stops when it has
finished those cells.

The additional empty cell doesn't have to be near the one you're trying
to spell-check. For example, cell A1 is empty in almost all of my
worksheets, so I always use it. So if you wanted to spell-check cell D5 on
the active worksheet and you know cell A1 is empty you could do this:

Application.Union(ActiveSheet.Range("A1"), _
ActiveSheet.Range("D5")).CheckSpelling

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm
 
T

Tushar Mehta

(e-mail address removed) asked the same question in the same
newsgroup a few minutes later!

See that discussion for a solution.

--
Regards,

Tushar Mehta
www.tushar-mehta.com
Excel, PowerPoint, and VBA add-ins, tutorials
Custom MS Office productivity solutions
 
G

Guest

Rob,
Worked perfectly !!

Thank you,
Greg

Rob Bovey said:
Hi Greg,

When you run the CheckSpelling method from a single cell, VBA
automatically assumes you want to spell-check the whole worksheet
(consistent with the way spell checking works in the UI).

The way I get around this is to select an empty cell in addition to the
cell I'm trying to spell-check and then run the CheckSpelling method on
these two cells. Since the empty cell is empty it has no effect, and since
the CheckSpelling method is being run on multiple cells it stops when it has
finished those cells.

The additional empty cell doesn't have to be near the one you're trying
to spell-check. For example, cell A1 is empty in almost all of my
worksheets, so I always use it. So if you wanted to spell-check cell D5 on
the active worksheet and you know cell A1 is empty you could do this:

Application.Union(ActiveSheet.Range("A1"), _
ActiveSheet.Range("D5")).CheckSpelling

--
Rob Bovey, Excel MVP
Application Professionals
http://www.appspro.com/

* Take your Excel development skills to the next level.
* Professional Excel Development
http://www.appspro.com/Books/Books.htm
 

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

Similar Threads

how do I stop pop-up message after spell check 2
Pasted text will not spell check 5
Spell Checking on a protected sheet 1
Spell check 6
spell check 1
Windows Vista Spell check 1
Spell checking textbox on a userform 10
spell check is not working 7

Top