Consulting

Results 1 to 6 of 6

Thread: Spelling suggester

  1. #1
    VBAX Regular
    Joined
    Mar 2006
    Location
    Indianapolis
    Posts
    14
    Location

    Spelling suggester

    Hello all,
    Can someone point me to, or give me an idea of how,
    to write code for a spelling suggester? I have a dictionary
    of approximately 1000 scientific terms, I would like it so that when
    the user starts to type in a textbox the first letter of the word they are looking for, all the words that begin with that letter are suggested in a drop box, then when they type in the second letter, all
    the words that start with the first two letters are suggested, etc...
    I hope this makes sense.
    Quinn

  2. #2
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    Have you tried using a combobox instead of a textbox?
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

  3. #3
    VBAX Regular
    Joined
    Mar 2006
    Location
    Indianapolis
    Posts
    14
    Location
    Tony,
    Does the Combobox have a method for spelling suggestion?
    Otherwise I would not want to have the user scroll through all
    the possible terms in a Combobox. For example, they would already have in mind that the term they are looking for starts with "PAR" but not the next letter.
    If they had to scroll through all of the terms starting with the A's then I might as well print off a list of all terms. Instead, I would like if they would type in P..A..R..
    and then the list would have only several to choose from....
    Thanks for your help...
    Quinn

  4. #4
    VBAX Wizard
    Joined
    May 2004
    Posts
    6,713
    Location
    No, a Combobox does not have a spelling suggester. What Tony is suggesting - I think - is that a Combobox has a MatchEntry property. As each character is typed into the combobox, the control searches for an entry matching all characters entered.

    I would think this would not be practical if you have 1000 entries.

    I can think how this could technically be possible, but I sure can not think of a way that would be efficient.

  5. #5
    VBAX Regular
    Joined
    Mar 2006
    Location
    Indianapolis
    Posts
    14
    Location
    Fumei (and Tony)
    Thanks for the clarification! I will try using the Combobox and play around with its MatchEntry property. Otherwise, I'll try writing code using some substring functions. The words in my list are medical terms, and most are from the old mainframe days where they had to be abbreviated to fit the eight character limit. So, they are are not very intuitive to remember, hence the spelling suggester. Again, thanks for your help.
    Quinn

  6. #6
    VBAX Master TonyJollans's Avatar
    Joined
    May 2004
    Location
    Norfolk, England
    Posts
    2,291
    Location
    I have used comboboxes (in userforms in Excel) with over 2000 entries and they have worked well - the entries do have to be in order, of course, but that shouldn't be a problem with a fixed list of terms.
    Enjoy,
    Tony

    ---------------------------------------------------------------
    Give a man a fish and he'll eat for a day.
    Teach him how to fish and he'll sit in a boat and drink beer all day.

    I'm (slowly) building my own site: www.WordArticles.com

Posting Permissions

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