![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Apr 2002
Location: USA
Posts: 17
|
Is there any way to run the spell check on a protected cell/sheet? I have a form that will be a mixture of text and numbers. Some of the cells will need to be spell checked but it seems that once I protect the sheet, spell-check is disabled. Any help?
Thank you in advance. |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Helena, MT
Posts: 13,690
|
You will need to record or write a macro that unprotects the sheet , does the spellcheck, and then reprotects the sheet.
|
|
|
|
|
|
#3 |
|
New Member
Join Date: Apr 2002
Location: USA
Posts: 17
|
Elementary. That makes total sense.
Thank you. |
|
|
|
|
|
#4 |
|
New Member
Join Date: Apr 2002
Location: USA
Posts: 17
|
When I run the macro it still asks me for my password even though I recorded it during the macro recording...is there something I need to do to embed my password into the macro?
|
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Helena, MT
Posts: 13,690
|
Place this line in the macro code at the appropriate place
Worksheets("Sheet1").Unprotect("password") Also, Worksheet("Sheet1").Protect("password")to reprotect [ This Message was edited by: lenze on 2002-04-26 13:44 ] [ This Message was edited by: lenze on 2002-04-26 13:48 ] [ This Message was edited by: lenze on 2002-04-26 13:48 ] |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Mar 2002
Location: Massachusetts, USA
Posts: 255
|
Often when I record a macro, it does not record the actual password. I find that I have to manually add it to the code, as above.
|
|
|
|
|
|
#7 |
|
New Member
Join Date: Apr 2002
Location: USA
Posts: 17
|
When I type in my password for the "Protect" command, I receive an error that says:
"Compile Error: Expected: End of Statement". Am I placing my password in the wrong spot? Here is what the code looks like: ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True End Sub ????? |
|
|
|
|
|
#8 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Columbus, OH, USA
Posts: 3,519
|
I don't see where you're putting your password in that line. This line of code will protect your worksheet without using a password.
The first rule of password protection is to create a password. If you want to add a password use something like this:
_________________ [b] Mark O'Brien [ This Message was edited by: Mark O'Brien on 2002-04-29 09:55 ] |
|
|
|
|
|
#9 |
|
New Member
Join Date: Apr 2002
Location: USA
Posts: 17
|
I didn't paste it in my posting. I had been placing it after "ActiveSheet.Protect"
|
|
|
|
|
|
#10 |
|
New Member
Join Date: Apr 2002
Location: USA
Posts: 17
|
It works now...Thanks Mark!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|