LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default spellchecking only the unlocked cells of a protected spreadsheet?

Paul B



I created a form in Excel 2002 that is distributed to multiple users as a
protected form with locked and unlocked cells that allow users to make
entries in the unlocked cells. Being protected, the form doesnt allow users
to spell check after completing their entries. I found your correspondence
on-line concerning this issue and used the code that you suggested. This,
however, performs the spell check on the locked cells as well as the unlocked
cells. So, I modified the code to try and only spell check the unlocked cells
as follows:



Sub Spell_Check()

ActiveSheet.Unprotect Password:="123"

Worksheets("Sheet1").Range("B2:B6").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True

Worksheets("Sheet1").Range("D2:D5").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True

Worksheets("Sheet1").Range("D9:D16").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True

Worksheets("Sheet1").Range("D19:D25").CheckSpellin g
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True

Worksheets("Sheet1").Range("D28:D34").CheckSpellin g
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True

Worksheets("Sheet1").Range("A36").CheckSpelling
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False, AlwaysSuggest:=True

ActiveSheet.Protect Password:="123"

End Sub



This progressed thru each range of cells as desired, but after the last
range was checked the spell checker displayed the Dialog Box €œDo you want to
continue checking at the beginning of the sheet?€ Selecting €œYes€ then sends
the Spell Checker through the Locked Cells allowing the user to make a change
each time the spell checker finds a word or abbreviation or acronym that is
not in the user dictionary.



Is it possible to only spell check unlocked cells?

Also, how do I protect the macro from being edited by the user?









 
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
Spellchecking a protected document in Excel BeerHR Excel Discussion (Misc queries) 1 March 5th 09 09:33 PM
Unlocked Cells in Protected Sheet KMA Excel Worksheet Functions 3 November 8th 07 07:08 PM
paste locked cells and unlocked cells in protected sheet Angeline Excel Worksheet Functions 15 November 1st 06 11:51 PM
allow comments, unlocked cells, protected sheet Jeff Higgins Excel Programming 3 October 7th 05 02:43 PM
Spell Check an Unlocked Cell in a Protected Spreadsheet Jill E Excel Worksheet Functions 0 August 22nd 05 07:57 PM


All times are GMT +1. The time now is 11:15 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"