Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Feb 2001
    Location
    Toronto, Ontario, Canada
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Change Spelling Language (Excel 2000)

    To spell check a range of cells, I have included the following in my code:
    rRange.CheckSpelling CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False _
    , AlwaysSuggest:=True, SpellLang:=1033
    It works fine. But now I'd like to change the language for this spell check, and change it back in the workbook close event.
    The "SpellLang" method suggests there's a way, but I can't find anything in help or in the KB other than ways of displaying the language in use (for the install language, the user interface language, or the Help language).
    I know the UI does not provide a way to change the language as it does in Word.
    Any ideas?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Change Spelling Language (Excel 2000)

    In Excel 2002, you can use

    Application.SpellingOptions.DictLang = 1033

    but I'm not sure if that was available in Excel 2000.

  3. #3
    Lounger
    Join Date
    Feb 2001
    Location
    Toronto, Ontario, Canada
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Change Spelling Language (Excel 2000)

    Hans,
    No, Excel 2000 does not support this method, so I can't see a way to set things up in workbook or sheet events.
    The first thing I was looking for, was the ID for the language I wanted. As is often the case, it was much easier simply to use the macro recorder while changing the language to what I wanted and then look at the code to get the ID, than to search the KB and TechNet where I found nothing.
    That done, I find that I can run the spell checker for my preferred language:
    Cells(19, 2).CheckSpelling CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False _
    , AlwaysSuggest:=True, SpellLang:=3084
    The next problem is to turn the language back to English. This is done by invoking the spell checker a second time:
    Cells(19, 2).CheckSpelling CustomDictionary:="CUSTOM.DIC", IgnoreUppercase:=False _
    , AlwaysSuggest:=True, SpellLang:=1033
    It means the user has to be aware of this, and when they see the change of language at the bottom of the dialog box, to click Cancel. It happens too fast for the user to notice that the spell checker has actually started again. Not perfect, but workable.
    A related issue in my case, is that when I restrict the spell check to a specific range of cells, it won't work if the cells are merged. So my procedure un-merges the cells and re-merges them when the user is finished spelling. This works, but introduces a further irritant: the word being checked is isolated and none of the rest of the text can be seen, denying the user the context. Maybe they can get used to this too???

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Change Spelling Language (Excel 2000)

    Another reason to avoid merging cells... (or move to Excel 2002 or 2003)

Posting Permissions

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