Excel - VBA function to check if a string has valid spelling

Asked By Edward on 21-Oct-09 03:15 PM
I have a word generator that creates various combinations of letters
but I only want to process words that would pass a spell check.  Is
there a VBA function that can operate on a string to check its
spelling?  I want this to be totally automated, not the CheckSpelling
method that brings up a dialog on misspelled words.  I want to skip
misspelled words, not correct them.




JP replied on 21-Oct-09 03:15 PM
The Application.CheckSpelling method returns True if the word is found
in Excel's dictionary, False otherwise.

http://msdn.microsoft.com/en-us/library/aa223822(office.11).aspx

Note that you have to use Application.CheckSpelling, the other
variations will bring up the dialog box.

--JP
Edward replied on 21-Oct-09 03:15 PM
Bingo!  Thanks.
JP replied on 21-Oct-09 05:27 PM
You're welcome!

--JP