While Excel’s main function is not word processing, many spreadsheets can accumulate a large amount of text, and spell checking a worksheet is usually the last thing people think to of doing.
If your spreadsheets fall in this category, you might try some creative ways to launch Excel’s “SpellChecker” from code as a gentle reminder.
The syntax to launch the Spelling dialog box using the default settings:
expression is a reference to the range or object to check the spelling of.
The following is example code to launch the Spelling dialog box before a workbook closes, but before asking to save. The expression tells VBA to check the spelling of all the cells in Sheet1. For the code to work you must place it in the ThisWorkbook code window in VBA.
Private Sub Workbook_BeforeClose(Cancel As Boolean)
VBA Coding Made Easy
Stop searching for VBA code online. Learn more about AutoMacro – A VBA Code Builder that allows beginners to code procedures from scratch with minimal coding knowledge and with many time-saving features for all users!