Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Jessica
 
Posts: n/a
Default spell check for protected worksheet for Excel 97

So this code works for Excel 2003:
Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

However when I was trying to get it to work for someone, they were using an
older version of Excel (I believe it was 97), so how can I get the code to
work to get the spell check to work under protection? I kept getting error
messages such as:

"Can't execute code in break mode"

and

"Compile error: named argument not found" and then it highlights this part
of the code: SpellLang:=1033

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

The "can't execute..." message means that you tried to start the macro while it
(or another macro was still running). Not uncommon while you're debugging.

Hit Run|Reset on the VBE toolbar (there's a Reset icon on Standard toolbar
within the VBE that will do the Reset, too.)

And try dropping the "spelllang:=1033" portion.

It still worked for me in xl2003, but I don't have xl97 to test.

Jessica wrote:

So this code works for Excel 2003:
Sub Spell_Check()
ActiveSheet.Unprotect Password:="justme"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="justme", DrawingObjects:=True, _
Contents:=True, Scenarios:=True
End Sub

However when I was trying to get it to work for someone, they were using an
older version of Excel (I believe it was 97), so how can I get the code to
work to get the spell check to work under protection? I kept getting error
messages such as:

"Can't execute code in break mode"

and

"Compile error: named argument not found" and then it highlights this part
of the code: SpellLang:=1033


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protecting certain cells only & Spell check Gus Excel Discussion (Misc queries) 3 March 18th 05 11:57 PM
spell check in an Excel protected sheet Cats Excel Discussion (Misc queries) 1 February 16th 05 08:32 PM
Auto spell check as in word NC Excel Discussion (Misc queries) 2 January 27th 05 05:43 PM
spell check protected document Sportingspaniel Excel Discussion (Misc queries) 1 January 10th 05 11:40 AM
Why doesn't spell check work on a protected worksheet? Creating Order Forms is Fun Excel Worksheet Functions 6 December 22nd 04 07:34 PM


All times are GMT +1. The time now is 03:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"