+ Reply to Thread
Results 1 to 5 of 5

Check spelling in a single cell AND spellchecking values only

  1. #1
    Anne CFS
    Guest

    Check spelling in a single cell AND spellchecking values only

    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

  2. #2
    Toppers
    Guest

    RE: 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


  3. #3
    Anne CFS
    Guest

    RE: Check spelling in a single cell AND spellchecking values only

    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" wrote:

    > 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


  4. #4
    Toppers
    Guest

    RE: Check spelling in a single cell AND spellchecking values only

    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" wrote:

    > 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" wrote:
    >
    > > 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


  5. #5
    Anne CFS
    Guest

    RE: Check spelling in a single cell AND spellchecking values only

    Hi there,

    Tried your suggestion, but the spellcheck was still not functioning. After
    a week or so away from it, I realised I ahdn't mentioned that the cell being
    spellchecked is a merged cell. I unmerged it, tried your code and it worked
    - beautifully.

    so my code now looks like this:

    If Range("B24").Value <> "" Then
    If Application.CheckSpelling(Word:=Range("b24"), _
    CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False) =
    False Then
    Range("b24:x28").UnMerge
    Range("b24").CheckSpelling SpellLang:=2057
    Range("B24:X28").Merge
    End If
    End If

    It still spellchecks the comment, but as it's only 1 cell, I'm settling for
    that.

    Thanks again for all your help.

    "Toppers" wrote:

    > 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" wrote:
    >
    > > 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" wrote:
    > >
    > > > 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


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1