R
Radcon trainer
Paul B
I created a form in Excel 2002 that is distributed to multiple users as a
protected form with locked and unlocked cells that allow users to make
entries in the unlocked cells. Being protected, the form doesn’t allow users
to spell check after completing their entries. I found your correspondence
on-line concerning this issue and used the code that you suggested. This,
however, performs the spell check on the locked cells as well as the unlocked
cells. So, I modified the code to try and only spell check the unlocked cells
as follows:
Sub Spell_Check()
ActiveSheet.Unprotect Password:="123"
Worksheets("Sheet1").Range("B2:B6").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
Worksheets("Sheet1").Range("D25").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
Worksheets("Sheet1").Range("D916").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
Worksheets("Sheet1").Range("D1925").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
Worksheets("Sheet1").Range("D2834").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
Worksheets("Sheet1").Range("A36").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
ActiveSheet.Protect Password:="123"
End Sub
This progressed thru each range of cells as desired, but after the last
range was checked the spell checker displayed the Dialog Box “Do you want to
continue checking at the beginning of the sheet?†Selecting “Yes†then sends
the Spell Checker through the Locked Cells allowing the user to make a change
each time the spell checker finds a word or abbreviation or acronym that is
not in the user dictionary.
Is it possible to only spell check unlocked cells?
Also, how do I protect the macro from being edited by the user?
I created a form in Excel 2002 that is distributed to multiple users as a
protected form with locked and unlocked cells that allow users to make
entries in the unlocked cells. Being protected, the form doesn’t allow users
to spell check after completing their entries. I found your correspondence
on-line concerning this issue and used the code that you suggested. This,
however, performs the spell check on the locked cells as well as the unlocked
cells. So, I modified the code to try and only spell check the unlocked cells
as follows:
Sub Spell_Check()
ActiveSheet.Unprotect Password:="123"
Worksheets("Sheet1").Range("B2:B6").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
Worksheets("Sheet1").Range("D25").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
Worksheets("Sheet1").Range("D916").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
Worksheets("Sheet1").Range("D1925").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
Worksheets("Sheet1").Range("D2834").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
Worksheets("Sheet1").Range("A36").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True
ActiveSheet.Protect Password:="123"
End Sub
This progressed thru each range of cells as desired, but after the last
range was checked the spell checker displayed the Dialog Box “Do you want to
continue checking at the beginning of the sheet?†Selecting “Yes†then sends
the Spell Checker through the Locked Cells allowing the user to make a change
each time the spell checker finds a word or abbreviation or acronym that is
not in the user dictionary.
Is it possible to only spell check unlocked cells?
Also, how do I protect the macro from being edited by the user?