The only solution is to use the selection change event and check to see if
the current cell is locked. If not locked then unprotect the sheet. Something
like this.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Me.Protect
If Target.Count > 1 Then Exit Sub
If Target.Locked = False Then Me.Unprotect
End Sub
Note that the spell check can/will operate on the entire sheet so if there
are spelling issues elsewhere in the sheet the user will be able to change
the text of those cells.
Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub
Unprotects the sheet, does the spellcheck then reprotects the sheet.
"justme" can be changed to your password.
Gord Dibben MS Excel MVP
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.