FracinDean
Board Regular
- Joined
- Jul 11, 2011
- Messages
- 110
- Office Version
- 365
- Platform
- Windows
I'm trying to generate word lists that meet certain tests. I would like to use Spellcheck to decide when something is actually a word. I am able to determine if something is a word from the return value "TRUE" or "FALSE", but I have not been able to determine how to close the spell check dialogue box from within my code. I always want to select the "Cancel" option for the dialogue box. I don't the issue is just about spell check, but about how to programmatically respond to a dialogue box when the fact that the dialogue opened has paused the execution of your code. Here is my code:
Code:
Dim isWord as Boolean, wordToCheck as string
Range("myWord").Select
wordToCheck = Selection.Value
isWord = Selection.CheckSpelling(wordToCheck)
Msgbox ("Result is " & isWord)