protected spell check for Excel 97

G

Guest

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
 
D

Dave Peterson

See one response at your post in .misc
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
 

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