Spell Check on Excel document

M

Michele

I have an Excel 2007 document that I have protected and am being asked if
it's possible to enable Spell Check on the protected document.
 
G

Gord Dibben

Document or worksheet is protected?

If you mean worksheet you will need VBA to unprotect, spellcheck then
re-protect.

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
 
M

Mike H

Hi,

I assume some cells are unlocked on the protected sheet or there would be
nothing enetered that could be spelled incorrectly.

You need a macro. Put a buttion on your sheet and assign the code below.
Change the password to your password

Sub Button2_Click()
With ActiveSheet
.Unprotect ("mypass")
.CheckSpelling
.Protect ("mypass")
End With
End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.
 

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.

Ask a Question

Top