Hi all,
I need a macro to do automatic spell check on a few cells when user enter comments in them. I prefer not to have users clicking on a button to start the spell check process.
I have the following codes which run fine if I click run every time but is there a way to make it automatic?
Is the 'application.intersect' need in this case?
Many thanks in advance.
I need a macro to do automatic spell check on a few cells when user enter comments in them. I prefer not to have users clicking on a button to start the spell check process.
I have the following codes which run fine if I click run every time but is there a way to make it automatic?
Code:
Sub SpellCheck()
Dim Myrange As Range
For Each Myrange In Union(Range("L10"), Range("L14"), Range("L29"))
If Application.CheckSpelling(word:=Myrange.Value) = False Then
Myrange.Font.Color = vbRed
Else: Myrange.Font.Color = vbBlack
End If
Next
End Sub
Is the 'application.intersect' need in this case?
Many thanks in advance.