+ Reply to Thread
Results 1 to 15 of 15

Word Search

  1. #1
    Registered User
    Join Date
    06-28-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2010
    Posts
    40

    Word Search

    Hi,

    I Have user form as below:

    Textbox1
    Listbox1

    I would like to build the search query where, when type the keyword, the list box items reduce to match the keywords.

    appreciate your help

    regards
    VJ

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Word Search

    upload a small (clean) sample workbook (not a pic) of what you are working with, and what your expected outcome would look like.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    06-28-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2010
    Posts
    40

    Re: Word Search

    Greetings Ford,

    Uploaded the file for your help.

    e.g. if I type "Gift" in the text box, the list box only display gift items.
    Attached Files Attached Files

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Word Search

    Try this one.
    Attached Files Attached Files
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  5. #5
    Registered User
    Join Date
    06-28-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2010
    Posts
    40

    Re: Word Search

    Thank you very much Ford ... really appreciate it



    *

  6. #6
    Registered User
    Join Date
    06-28-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2010
    Posts
    40

    Re: Word Search

    Ford... Noted that you are referring the excel sheet1 for reference. can help to point the reference to the Listbox instead?

    Please Login or Register  to view this content.
    Last edited by FDibbins; 03-17-2017 at 02:21 AM.

  7. #7
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Word Search

    Ford ??????

  8. #8
    Registered User
    Join Date
    06-28-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2010
    Posts
    40

    Re: Word Search

    Ho Ford,

    I want to do the filtering based on Listbox.
    Please Login or Register  to view this content.
    Last edited by FDibbins; 03-17-2017 at 02:21 AM.

  9. #9
    Registered User
    Join Date
    06-28-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2010
    Posts
    40

    Re: Word Search

    Ford,

    I hit error when try to run the script.... really appreciate your help


    regards
    VJ
    Attached Files Attached Files

  10. #10
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Word Search

    Please use Code Tags when posting code according to Forum Rule#3

    Please try to understand the code before you start making changes to it. Code from Post#4 works just fine.

    Please Login or Register  to view this content.
    Also remove RowSource from ListBox Properties in order to make code work.
    Last edited by bakerman2; 03-17-2017 at 02:17 AM.

  11. #11
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,929

    Re: Word Search

    I think you have me mixed up with bakerman2, he is the 1 that is providing the assistance

    Also, please note that when posting code, use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    (I have added them for you in your previous posts)

  12. #12
    Registered User
    Join Date
    06-28-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2010
    Posts
    40

    Thumbs up Re: Word Search

    Thousand apology,

    ops.... sorry and thank you very much guys... Ford & Bakerman2 .. I got mixed up.. hahahahaah

    BTW, my full project will looks like as attached file. I'm working out a specific keyword search engine.
    Every category are unique and the search should be within the particular category.

    For example
    1. First user must determine the Main category : Bulk or Form
    2. From this they determine sub category e.g. Bulk - Goods, Bulk - Services or Form - Goods, Form - Services
    3. When they select the sub category, the user form will list down all the items under that category only
    4. Then they can use the text box to do key word search within the sub- category items.

    Regards
    VJ
    Attached Files Attached Files
    Last edited by cupid800429; 03-17-2017 at 05:05 AM. Reason: Missed Attachment

  13. #13
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Word Search

    Try this for Bulk page.

    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    06-28-2015
    Location
    Kuala Lumpur, Malaysia
    MS-Off Ver
    2010
    Posts
    40

    Re: Word Search

    Looks better, but i'm unable to backspace and continue with new search within the same sub category.

  15. #15
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: Word Search

    Try this, done it for Bulk - Loan & Bulk - Investment.
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Excel VBA - Word to search for part of a word and replace full word
    By charlie543 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-24-2016, 02:56 AM
  2. [SOLVED] Autocomplete search word based on Initial first/random word
    By radian89 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-19-2015, 11:51 PM
  3. Replies: 2
    Last Post: 04-29-2014, 10:06 AM
  4. Replies: 2
    Last Post: 08-05-2013, 04:45 PM
  5. Replies: 1
    Last Post: 01-25-2011, 10:50 PM
  6. How to search for a word in a column and have entire row opaque once word is found
    By copleyr in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 09-04-2009, 07:11 PM
  7. [SOLVED] search for a specific word and copy the word and the preceeding words until a comma
    By DHANANJAY in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-31-2005, 09:10 AM

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