Check spelling in a single cell AND spellchecking values only

G

Guest

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
 
G

Guest

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
 
G

Guest

Hi Toppers

Thanks for code. I've tried it and it runs beautifully, but doesn't check
the spelling. No spellcheck dialog box and no correction of a host of
Scottish words which are definitely not in the English dictionary, but which
eloquently express my frustration with this!!!

I should have mentioned - I'm using XL2000.

Cheers!
Anne

Toppers said:
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 said:
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
 
G

Guest

Hi,

Cells.CheckSpelling SpellLang:=2057

Or

Range("a2").CheckSpelling SpellLang:=2057

Invokes Spellchecker and looks at all cells or a given cell e.g. A2.

So try this ( though I doubt if it speaks Scottish!) .

HTH


Anne CFS said:
Hi Toppers

Thanks for code. I've tried it and it runs beautifully, but doesn't check
the spelling. No spellcheck dialog box and no correction of a host of
Scottish words which are definitely not in the English dictionary, but which
eloquently express my frustration with this!!!

I should have mentioned - I'm using XL2000.

Cheers!
Anne

Toppers said:
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 said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top