ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Spell Check on Excel document (https://www.excelbanter.com/excel-discussion-misc-queries/255791-spell-check-excel-document.html)

Michele

Spell Check on Excel document
 
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.

Gord Dibben

Spell Check on Excel document
 
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

On Tue, 9 Feb 2010 10:58:04 -0800, Michele
wrote:

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.



Mike H

Spell Check on Excel document
 
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.


"Michele" wrote:

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.



All times are GMT +1. The time now is 06:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com