+ Reply to Thread
Results 1 to 5 of 5

Userform : Using two text boxes to find data within a sheet and displaying it in a listbox

  1. #1
    Registered User
    Join Date
    02-03-2021
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    6

    Exclamation Userform : Using two text boxes to find data within a sheet and displaying it in a listbox

    Hi,

    I was recently given an assignment where I need to essentially create a search list among a table of destinations. I managed to create a search for just a single value and display all its results in a Listbox, But I am having a lot of issues trying to create a dual text box search and displaying it in a Listbox. To put it into further context I want to enter "Fort Liard" into textbox 1(meant to be Origin) and "Fort Simpson" into textbox2(meant to be Destination) and finally display all its matching results in a Listbox for everybody to see. Additionally, I added a print function but can't seem to get the print dimensions correct.

    I've tried to search online for answers but I can't seem to find any answers, but I could attribute this to my lack of VBA knowledge. I'm at my wit's end here and I would really appreciate all the help I can get on the matter.

    For the working textbox which searches a single value, I used this code
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by TanukiMasta; 02-04-2021 at 03:14 PM.

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,337

    Re: Userform : Using two text boxes to find data within a sheet and displaying it in a lis

    Please abide by rules regarding 'code tags'
    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however you need to include code tags around your code.

    Please take a moment to add the tags. Posting code between tags makes your code much easier to read and copy for testing, and it also maintains VBA formatting.

    Please see Forum Rule #2 about code tags and adjust accordingly. Click on Edit to open your post, then highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    (Note: this change is not optional. No help to be offered until this moderation request has been fulfilled.)

  3. #3
    Registered User
    Join Date
    02-03-2021
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    6

    Re: Userform : Using two text boxes to find data within a sheet and displaying it in a lis

    Thank you Torachan I appreciate the information, apologies as this is my first post

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,666

    Re: Userform : Using two text boxes to find data within a sheet and displaying it in a lis

    TanukiMasta,

    I would do like attached.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2021
    Posts
    5,991

    Re: Userform : Using two text boxes to find data within a sheet and displaying it in a lis

    Duplicate topics in Commercial Services.

    https://www.excelforum.com/commercia...a-listbox.html

+ 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] Transfer Multiple Listbox Selections to Userform Text Boxes
    By omagoodness in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-10-2020, 03:51 PM
  2. [SOLVED] Displaying the header on a userform Listbox
    By rakotonirinas in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-21-2019, 11:44 AM
  3. Search Data Through Listbox Userform and Fill Specific data Text Boxes in other form
    By mahmudayaz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-10-2017, 09:25 AM
  4. Need help with VBA [Write data to sheet for listbox items with boxes checked]
    By JLandrum in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-16-2017, 12:06 PM
  5. find text in listbox on userform, delete row containing that text on spreadsheet
    By tsiguy96 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-09-2016, 03:11 AM
  6. [SOLVED] Populate userform text boxes with dater from another sheet, dependant on list box selectio
    By MallorcaPete in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 06-17-2015, 07:01 AM
  7. Displaying text from a sheet automatically in a userform?
    By keith_darcy1 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-22-2012, 08:47 AM

Tags for this Thread

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