I’m trying to create a macro that will only spellcheck specific cells. I have succeeded in spellchecking the cells, but for some reason the spellcheck wizard keeps running afterwards and tries to check any text boxes on my spreadsheet.
Below is the code:
Range(“C8”).Select
Selection.CheckSpelling SpellLang:=1034
Updating code with suggestions, however the code is still spellchecking text boxes:
Dim ws As Worksheet
Set ws = Worksheets("Sheet1")
Const dummyCell = "Z999" 'address of an empty cell
Dim cellsToCheck As Range
Set cellsToCheck = ws.Range("C8")
Union(Range(dummyCell), cellsToCheck).CheckSpelling
I cycled through and it is spellchecking the text boxes before the actual range specified in "CellsToCheck".