+ Reply to Thread
Results 1 to 9 of 9

Populate Userform Off Existing Data

  1. #1
    Registered User
    Join Date
    04-05-2016
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    40

    Populate Userform Off Existing Data

    Hello All -

    I have a userform where "Product ID" is a combobox. I would like the selection of that field to autopopulate other fields (i.e. "unit price", "product description"). The combo box is created referencing a list on another sheet.

    Capture.PNG
    Attached Files Attached Files
    Last edited by gxm100; 12-11-2018 at 02:55 PM. Reason: attaching file

  2. #2
    Valued Forum Contributor dotchiejack's Avatar
    Join Date
    05-21-2015
    Location
    Antwerp,Belgium
    MS-Off Ver
    2016
    Posts
    398

    Re: Populate Userform Off Existing Data

    You should post a example of your workbook,not a picture.
    With a picture we know nothing. (for example how is the combobox populated)
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    04-05-2016
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    40

    Re: Populate Userform Off Existing Data

    Here is the workbook - sorry for that
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    09-10-2017
    Location
    Chippenham
    MS-Off Ver
    365
    Posts
    4,562

    Re: Populate Userform Off Existing Data

    Remove the Row source property of the combobox & try
    Please Login or Register  to view this content.
    The 2 lines in red must go at the very top of the module, before any code

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

    Re: Populate Userform Off Existing Data

    Hello gxm100,

    The UserForm layouts in both of your posted workbooks does not match your picture in the first post. You should review your information and workbooks before you post. If we have to try and guess what you want or need then we most likely will fail to provide you with a working solution.
    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!)

  6. #6
    Registered User
    Join Date
    04-05-2016
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    40

    Re: Populate Userform Off Existing Data

    Thank you Fluff! That worked perfectly...

    Any suggestion on if I wanted another Combo Box on the same userform to bring in data from a different worksheet? In the workbook attached I'd like the CustomerID labeled combo box to pull the relevant info from the Customer DB tab.

    I tried essentially copy and pasting the code and changing the worksheet references as well as combo box references, but I had no success. No error, but the drop down simply didn't pick any info up from Customer DB tab.
    Attached Files Attached Files

  7. #7
    Valued Forum Contributor
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    377

    Re: Populate Userform Off Existing Data

    Where did you paste the code.
    There appears to be no code related to Customer ID combobox in Invoice code window.
    torachan.

  8. #8
    Registered User
    Join Date
    04-05-2016
    Location
    Philadelphia, Pennsylvania
    MS-Off Ver
    Microsoft Office Professional Plus 2013
    Posts
    40

    Re: Populate Userform Off Existing Data

    Torachan - there is no code in there related to Customer ID combobox...I had copied and pasted it and it didn't work so I removed it to clean up junk while I try to figure out the right approach.

    Here is the code which I attempted to use:

    Please Login or Register  to view this content.

  9. #9
    Forum Expert
    Join Date
    09-10-2017
    Location
    Chippenham
    MS-Off Ver
    365
    Posts
    4,562

    Re: Populate Userform Off Existing Data

    Add this to the top of the module
    Please Login or Register  to view this content.
    Then use
    Please Login or Register  to view this content.
    Your Combo2 change is fine but you need to change UfDic to UfDic2

+ 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