+ Reply to Thread
Results 1 to 6 of 6

[USERFORM] Dynamic searchable user form.

  1. #1
    Forum Contributor
    Join Date
    03-06-2020
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    113

    [USERFORM] Dynamic searchable user form.

    I have names in COL A and contact number in COL B . I have a userform with two textbox and a commandbutton which will add new enrty. I want the both textbox to act as search box. If i type name in textbox1 or number in textbox2 then it should show me suggestions automatically. If my name matches with existing name then textbox 2 shld be auto filled with corresponding number and same for textbox2 if result matches then fill textbox1 with name. If i type Surname it shld display results (not only left search).

    NOTE:- Both columns will have blanks zeroes and duplicate entries. [Can also use combobox]
    Attached Files Attached Files
    Last edited by thebeastslayer; 10-14-2020 at 06:49 AM.

  2. #2
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: [USERFORM] Dynamic searchable user form.

    you can't show a dropdown with suggestion within a textbox. it can only show one value. you would have to use a combo box or a list box.

  3. #3
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,810

    Re: [USERFORM] Dynamic searchable user form.

    Try the attached file. Most of the names is column A of the file you posted had leading spaces which I have removed. The userform has three new buttons. Enter a name in TextBox1 and click the FIND button. Click the CLEAR button to clear the text boxes. Enter a number in TextBox2 and click the FIND button. Click the CLEAR button if you want to do another search. The EXIT button closes the userform.
    Attached Files Attached Files
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  4. #4
    Forum Contributor
    Join Date
    03-06-2020
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    113

    Re: [USERFORM] Dynamic searchable user form.

    As soon as i start typing i need recommendations like in google search . I dont mind using combobox or listbox with textbox. Anything is fine.

  5. #5
    Forum Contributor
    Join Date
    03-06-2020
    Location
    INDIA
    MS-Off Ver
    2007
    Posts
    113

    Re: [USERFORM] Dynamic searchable user form.

    I have found partial solution and implemented in my workbook. I have added 2 listbox and it works fine but problem is duplicates ( Example :- Owen) . Also how do i implement the below line of code untill last non empty row in col A. Suppose last non empty row is 199 then i want

    Please Login or Register  to view this content.
    Formula used in h2 is (implemented using vba)

    "=IFERROR(VLOOKUP(ROW(H1),F2:G1000,2,0),"")"

    I want One more line of code that is if textbox lose focus then listbox.visible=false.
    Attached Files Attached Files
    Last edited by thebeastslayer; 10-15-2020 at 03:49 AM.

  6. #6
    Banned User!
    Join Date
    02-06-2020
    Location
    Iowa City, IA, USA
    MS-Off Ver
    2016 - 365 / 2007
    Posts
    2,014

    Re: [USERFORM] Dynamic searchable user form.

    I'm sorry I started to answer here. I'm hoping someone else can finish it. you have a really good start. but I got busy with something else and it's taking way to much time. I apologize but I'll have to drop out here.

+ 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. Dynamic User Form
    By x_ampl1 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-02-2020, 08:57 AM
  2. Creating a User Form Template with Dynamic fields
    By squidpop in forum Excel General
    Replies: 1
    Last Post: 01-23-2016, 03:21 PM
  3. Replies: 5
    Last Post: 08-04-2015, 12:09 PM
  4. [SOLVED] User form combo box to look up a dynamic named range
    By cobwebs in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-14-2014, 07:24 AM
  5. Freeze user form while creating many dynamic controls
    By richard.briggs in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-15-2014, 04:14 AM
  6. Create a Dynamic User Form
    By abhishekchak in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-31-2012, 06:53 AM
  7. [SOLVED] Adding Dynamic Text to a User Form
    By HangMan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-08-2012, 01:38 PM

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