+ Reply to Thread
Results 1 to 5 of 5

Populate Userform from search box or scroll bar.

  1. #1
    Registered User
    Join Date
    11-21-2013
    Location
    Wellington, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    20

    Populate Userform from search box or scroll bar.

    With great help from this Forum I have managed to create the attached Workbook with a Userform that populates with the first spreadsheet record when opened and which then allows new records to be created and/or updated ... Kudo's and much appreciation to Leith for his help with this.

    What I would like to do now is to be able to make the first Textbox on the Userform (1) a dropdown Listbox that filled with the Contract Names in Column A on Sheet 1. The idea is that rather than spend ages going through all the records with the Spin Button, just so I could get to the record I wanted to update, I could just select a record from the dropdown Listbox that would then fill the other text boxes on the Userform (for altering/updating).

    Alternatively, even browsing the records with a Scroll Bar may be faster than using the Spin Button, especially with having to chop and change from the first rows of records to the last ones, or having a search function whereby you could start typing a name into the first Textbox (top left) on the Userform and it would find a matching record and fill the form.

    If I haven't completely confused everyone with the explanation above, I would be extremely grateful for any help you could provide.

    PS. If playing with the attached, please feel free to tell me what I could have done better ... after all, we are supposed to learn by our mistakes !

    If you are looking at this Leith ... check out the improved help form ... you might get another laugh !
    Attached Files Attached Files

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Populate Userform from search box or scroll bar.

    Hello Darryl,

    Your Edit warning reminds me a humorous coffee mug I saw chiding FEMA (Federal Emergency Management Agency) evacuation plans. It read: "Run motherf***er, run!"

    The ComboBox is a better approach than a TextBox. The ComboBox will, provided the data is alphabetical, scroll down to the entry you are looking as you type. You could use a second column to hold the row number of the record making it easier and faster to read and write the records. You could keep the spin buttons to allow the user to move through the records one at time. I will cobble something together for you then you can review it and tell me how bad it is and we'll start over.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    11-21-2013
    Location
    Wellington, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Populate Userform from search box or scroll bar.

    Hi Leith,

    That would be awesome if you could come up with something ... I spent most of the day trying different things, breaking it and then restoring from a backed up copy. I spend most of my days on construction sites as a Project Manager and only get to play with this in my own time usually (even though it is for the benefit of all in the office) hence I probably don't get there quire as fast as the folks that spend a lot of time working with excel or VBA.

    On the plus side ... during my playing with it today I managed to add in a splash screen when it opens up (sample copy attached) ... I guess what I lack in programming skills I make up for with humour !

    Thanks for the help and look forward to seeing what you cobble together.

    Regards
    Darryl
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    11-21-2013
    Location
    Wellington, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Populate Userform from search box or scroll bar.

    "Bump no response"

  5. #5
    Registered User
    Join Date
    11-21-2013
    Location
    Wellington, New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    20

    Re: Populate Userform from search box or scroll bar.

    Hi Leith,

    Have had several goes at getting the form to populate from a ComboBox as discussed but have to admit it is beyond my level of expertise (currently), so I eagerly await your expertise !

    Regards
    Darryl

+ 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. [SOLVED] Populate a Listbox in a UserForm based on a Search Result
    By clapforthewolfman in forum Excel Programming / VBA / Macros
    Replies: 29
    Last Post: 07-17-2013, 07:53 PM
  2. [SOLVED] Userform to search two conditions (from comboboxes) to populate textbox
    By mattyh555 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-10-2012, 04:51 PM
  3. Populate a Userform from a selection on a popup search listbox
    By ahmadassaad in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 10-16-2012, 09:00 AM
  4. Userform populate listbox with search from multiple textboxes
    By chendysworld in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-12-2012, 11:12 AM
  5. SEARCH option to populate data in VBA userform
    By qchau in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-30-2011, 02:00 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