Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Spell Check Protected WORKBOOK

4 views
Skip to first unread message

tso

unread,
Jun 11, 2013, 2:06:41 PM6/11/13
to

Hi Everyone,

I have found the Macro code to check spelling for one particular
worksheet.

However, I want the macro to check the spelling in all 10 worksheets.

This is what I am using now.

Sub SpellCheckIt()
Sheets("Sheet1").Unprotect "Password"
ActiveSheet.CheckSpelling
Sheets("Sheet1").Protect "Password"
End Sub


Thank you,




--
tso

Claus Busch

unread,
Jun 11, 2013, 3:03:51 PM6/11/13
to
Hi,

Am Tue, 11 Jun 2013 19:06:41 +0100 schrieb tso:

> However, I want the macro to check the spelling in all 10 worksheets.

try:

Sub SpellCheckIt()
Dim i As Integer
For i = 1 To Sheets.Count
With Sheets(i)
.Unprotect "Password"
.CheckSpelling
.Protect "Password"
End With
Next
End Sub


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
0 new messages