+ Reply to Thread
Results 1 to 5 of 5

Fill out listbox with inputbox

  1. #1
    Forum Contributor
    Join Date
    05-07-2013
    Location
    France
    MS-Off Ver
    Excel 2007
    Posts
    122

    Fill out listbox with inputbox

    Hello!

    I have a database on excel sheet for devices: for each device I have 11 column ( ID, name, serialnumber, company number,date....).
    I want to add on my userinterface a possibility to modify a device : the user click on the button modify on the userinterface, an inputbox appears where he can put the serial number of his device that he want to modify then when he click ok a userform with a listbox appears with all the device in the database that match with the serial number given by the user (because sometimes for different manufacturer we can have the same serial number) , so the user can click on the right device in the list box and in the same userform i put all fields of the device so he can modify the field of his choice.

    I just want to know how with the inputbox we can select rows in the excel sheet (database)


    Here is the code that I have written ( in the modify macro I have succed to select one device with the right SN but if there is 2 with same SN he only select one...)
    Can anyone help me please?
    Thank you for your help!VBA_Databasetrial.xlsm

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Fill out listbox with inputbox

    Hi,
    i have added a button to you user interface called Find Serial.
    this will then call the inputbox for a serial number.
    This then loads a userform with a listbox of all found items.
    if you select one and hit enter button it will give you the row number.
    Hopefully you will be able to adapt this to use to pull up the range of data required into you textboxes to edit
    Attached Files Attached Files
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  3. #3
    Forum Contributor
    Join Date
    05-07-2013
    Location
    France
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Fill out listbox with inputbox

    Thank you very much for your fast answer!!! I'll try it and tell you about the result!! Thank you again!

  4. #4
    Forum Contributor
    Join Date
    05-07-2013
    Location
    France
    MS-Off Ver
    Excel 2007
    Posts
    122

    Re: Fill out listbox with inputbox

    Quote Originally Posted by Sean Thomas View Post
    Hi,
    i have added a button to you user interface called Find Serial.
    this will then call the inputbox for a serial number.
    This then loads a userform with a listbox of all found items.
    if you select one and hit enter button it will give you the row number.
    Hopefully you will be able to adapt this to use to pull up the range of data required into you textboxes to edit


    I am not able to download the file!!! Can you send it to me by mail? [email protected]

  5. #5
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: Fill out listbox with inputbox

    i cant e-mail from this computer.
    i have uploaded file again.
    Should be ok, i downloaded ok.
    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)

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