+ Reply to Thread
Results 1 to 7 of 7

VBA lookup value in combo box, to populate value in textbox

  1. #1
    Registered User
    Join Date
    10-14-2014
    Location
    Grand Blanc, MI
    MS-Off Ver
    Excel 2007
    Posts
    5

    VBA lookup value in combo box, to populate value in textbox

    Hello, first time posting here

    I am very new to using the VBA feature in excel, and I need some help creating a user form on the attached spread sheet.

    I work at a manufacturing facility and over the past 6 months or so i have been working with our plant manager (who is not computer-literate) on creating a current equipment list (Sheet 2), and also starting a preventive maintenance program.

    As for my question - i have set up a user form where one selects the machine number from a drop down menu in combo box. What I would like to have happen is that when the machine number is selected from the combobox, three textboxes fill with the corresponding data from the table on the machine list tab: Machine Description, Model #, Serial #.

    Eventually each machine will have a what i am calling a "PM Log" which will have the history of the work done to that machine. My over all goal is to have the master sheet set up so that using the user form, one can select the machine and the data for that machine will be displayed.

    But if I can just get the user form to work I would greatly appreciate it!
    Attached Images Attached Images
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: VBA lookup value in combo box, to populate value in textbox

    Tell me what you think:
    [hint: if you dbl-click on Date column on Report sheet the current date/time will appear]
    When you activate (click on the tab) Machine History you will see the history for the machine # already selected in the Report worksheet.
    Attached Files Attached Files
    .. and don't forget to have fun!
    Bogdan.

    mark SOLVED and Add Reputation if my answer pleases you

  3. #3
    Registered User
    Join Date
    10-14-2014
    Location
    Grand Blanc, MI
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: VBA lookup value in combo box, to populate value in textbox

    Well, I can say that I do like this set up. THis way, I don't have to have multiple workbooks for each machine. I do have a few suggestions though.

    I have re-attached the workbook you sent. I have attached comments to the areas i need changed, I would like to the machine # on the history tab to be the first column.

    But I like the format you have set up. Thank you for your help.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: VBA lookup value in combo box, to populate value in textbox

    there you go:
    (don't forget to Add Reputation if you are satified)
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-14-2014
    Location
    Grand Blanc, MI
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: VBA lookup value in combo box, to populate value in textbox

    I like it, and the Manufacture is the manufacture of the part, not the machine. ANd yes there will be a cost formula, the column to the right will be "Ext. Cost", cost each * qty
    Last edited by afwelch87; 10-14-2014 at 04:15 PM.

  6. #6
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    861

    Re: VBA lookup value in combo box, to populate value in textbox

    If it's OK mark the thread as SOLVED, if not upload the file with comments on what is to be done further.

  7. #7
    Registered User
    Join Date
    10-14-2014
    Location
    Grand Blanc, MI
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: VBA lookup value in combo box, to populate value in textbox

    Just a couple of things I noticed,

    one of them is that things sometimes seem to drop off the machine history list, when adding items and refreshing?

    Also, I was thinking about renaming the Report Tab to "Data Input", and have a third tab that one could use to look up the history of a particular machine, without haveing to do the filter. What I think might be best is that this third tab could also be a separate workbook.

    Again, thanks for the help.
    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. Populate 2nd combo with alpha based on 1st combo with 2 columns of numeric codes
    By dovermac in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2014, 10:09 AM
  2. Populate Combo box 2 based on Selected item in Combo box 1
    By Vasu_XL in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-20-2014, 07:45 AM
  3. Populate TextBox from Module prior to opening TextBox
    By Dabbler39 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-05-2013, 05:50 PM
  4. Populate a textbox in a userform using multiple selections from a combo box
    By kksf in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2013, 10:59 AM
  5. Populate a Combo Box based on the selection of another Combo Box
    By thunder279 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-18-2011, 03:40 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