ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Spell Check Protected WORKBOOK (https://www.excelbanter.com/excel-discussion-misc-queries/448868-spell-check-protected-workbook.html)

tso

Spell Check Protected WORKBOOK
 
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,

Claus Busch

Spell Check Protected WORKBOOK
 
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


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

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