Spell Check Macro Help

K

Kevin Ward

I am running the following script. It unprotects, runs spell check, and
then re-protects. That portion works. It does not however allow for
formatting rows once the macro runs. Any ideas why?


Sub Spellcheck_Click()

ActiveSheet.Unprotect Password:="**"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="**"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowFormattingRows:=True

End Sub

I ran a similar macro that made the row formatting work, but when I
tried to add the password to it it would not reprotect with the
password.
 
D

Dave Peterson

You have a response at your post in .misc.

Kevin said:
I am running the following script. It unprotects, runs spell check, and
then re-protects. That portion works. It does not however allow for
formatting rows once the macro runs. Any ideas why?

Sub Spellcheck_Click()

ActiveSheet.Unprotect Password:="**"
Cells.CheckSpelling SpellLang:=1033
ActiveSheet.Protect Password:="**"
ActiveSheet.Protect DrawingObjects:=True, Contents:=True,
Scenarios:=True _
, AllowFormattingRows:=True

End Sub

I ran a similar macro that made the row formatting work, but when I
tried to add the password to it it would not reprotect with the
password.
 

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