Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
Kevin Ward
 
Posts: n/a
Default Spellcheck Macro Help


I am posting this here as well since this is the "Best Forum to Post":)


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.


--
Kevin Ward
------------------------------------------------------------------------
Kevin Ward's Profile: http://www.excelforum.com/member.php...o&userid=31417
View this thread: http://www.excelforum.com/showthread...hreadid=516394

  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Spellcheck Macro Help

Your code worked ok for me in xl2003. But I don't think I'd have two .protect
lines in the

Option Explicit

Sub Spellcheck_Click()

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

End Sub

Actually, when I ran your code, the worksheet ended up protected with no
password.


Kevin Ward wrote:

I am posting this here as well since this is the "Best Forum to Post":)

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.

--
Kevin Ward
------------------------------------------------------------------------
Kevin Ward's Profile: http://www.excelforum.com/member.php...o&userid=31417
View this thread: http://www.excelforum.com/showthread...hreadid=516394


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Kevin Ward
 
Posts: n/a
Default Spellcheck Macro Help


Thanks for your help. I played around with having only one protect.
this is what finally worked.

Sub Spellcheck_Click()

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

End Sub


--
Kevin Ward
------------------------------------------------------------------------
Kevin Ward's Profile: http://www.excelforum.com/member.php...o&userid=31417
View this thread: http://www.excelforum.com/showthread...hreadid=516394

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
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
macro with F9 Kenny Excel Discussion (Misc queries) 1 August 3rd 05 02:41 PM
Make Alignment options under format cells available as shortcut dforrest Excel Discussion (Misc queries) 1 July 14th 05 10:58 PM
Playing a macro from another workbook Jim Excel Discussion (Misc queries) 1 February 23rd 05 10:12 PM


All times are GMT +1. The time now is 12:05 PM.

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

About Us

"It's about Microsoft Excel"