Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Spell Checking on a protected sheet
Hi Folks,
I have a sheet that is protected, and have the following code on a control_click event to allow spell checking. It unprotects the sheet, runs the spelling check function, then re-protects the sheet with the original password. It also allows row height to be formatted when the sheet is protected. Private Sub SpellCheck_Click() ActiveSheet.Unprotect Password:="Password" Cells.CheckSpelling _ CustomDictionary:="CUSTOM.DIC", _ IgnoreUppercase:=False, _ AlwaysSuggest:=True ActiveSheet.Protect Password:="Password" ' Allow rows to be formatted (autofit) on a protected worksheet. If ActiveSheet.Protection.AllowFormattingRows = False Then ActiveSheet.Protect AllowFormattingRows:=True End If End Sub This works fine if there is at least one spelling error. However, if there are zero errors on the sheet, then this code re-protects the sheet without a password. Any user can run the spell checker to remove the password, then just unprotect the sheet. Any suggestions on how to fix this? I'd like to allow users to run spell checking and adjust row height, but I want it to stay password protected too! Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Spell Checking on a protected sheet | Excel Programming | |||
spell check on protected sheet | Excel Discussion (Misc queries) | |||
Spell checking a protected worksheet | Excel Discussion (Misc queries) | |||
How can I use spell checking in a protected worksheet? | Excel Worksheet Functions | |||
Spell checking a protected sheet | Excel Programming |