Spell check on a protected sheet

J

jontait

Hi there

Does anyone know how to allow the spell check function on a protecte
sheet. I.e., is it possible to provide some code that would work when
command button is pressed that would then unprotect the sheet b
automatically entering the password, do the spell check, the
re-protect the sheet again?

Or anyway to tell excel that its ok to allow the spell check functio
on the sheet even though its protected?

Many thank
 
F

Frank Kabel

Hi
AFAIK this is not possible. You can create a macro which unprotects
your sheet first though. Just record a macro while doing this manually
 
G

Gord Dibben

You must unprotect the sheet first.

Record a macro while unprotecting, running spell check then re-protecting.

Or copy/paste this code to a general module.

Sub Spell_Check()
ActiveSheet.Unprotect Password:="password"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="password", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

Remember to also password-protect your VBA project so users can't see the
unprotect/protect password.

Gord Dibben Excel MVP
 
Top