Question

I would like spellcheck to check the spelling in a specific cell within Excel. I am using the below code, which does work.

If Target = rDNotes Then
    Target.CheckSpelling
End If

The thing that I don’t like about this code is that it prompts you no matter what, even if it didn’t find any errors in the cell. It will ask if I want to check the spelling in the rest of the worksheet.

Is there a way for it to check the spelling and if it doesn’t see any errors it doesn’t prompt any alerts or display any popups at all, that it would allow you to carry on with your work? I want it to only prompt me when it does find a spelling error and only when the error is found in this particular cell.

Thanks for any help or suggestions someone might have.

Was it helpful?

Solution

I actually just figured it out. I needed to put.

If Target = rDNotes Then
    Target.CheckSpelling SpellLang:=1033
End If

I am not sure what the SpellLang:=1033 means, but this works exactly how I need it to work. I will have to do further research to know what that does and the other options that I am sure it has.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top