View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Toppers Toppers is offline
external usenet poster
 
Posts: 4,339
Default Check spelling in a single cell AND spellchecking values only

Hi,

Try this which ignores cooments (XL2003):

wsActive.Select
If Range("B24").Value < "" Then
If Application.CheckSpelling(Word:=Range("b24"), _
CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False) = False Then
MsgBox ("Check spelling of " & Range("B24"))
End If
End If


"Anne CFS" wrote:

I'm creating templates for users to use as reports - these have (among many
others) one merged cell which contains free text and of course the users
don't spell check.

I'm quite happy coding for spell checking before saving, but would prefer to
spellcheck only the relevant cell and I cannot get this to work. Code given
below:

Set wsActive = Worksheets("Current Status")
wsActive.Select
If Range("B24").Value < "" Then
wsActive.Range("B24").CheckSpelling _
CustomDictionary:="CUSTOM.DIC", _
IgnoreUppercase:=False, _
AlwaysSuggest:=True
End If

This still checks the entire sheet, so I don't know what to do next. Also,
can I spellcheck only the value of this cell (Free entry text) without the
comment [which was added as short notes on the type of content required in
the cell].

Thanks in advance

Anne