+ 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
    507

    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 Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    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
    23,258

    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
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,302

    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 Guru
    Join Date
    09-10-2017
    Location
    Chippenham, England
    MS-Off Ver
    365
    Posts
    15,077

    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)

Similar Threads

  1. [SOLVED] Auto Populate data from an Existing Sheet
    By fareedexcel in forum Excel General
    Replies: 2
    Last Post: 09-20-2017, 07:23 AM
  2. [SOLVED] VB code to populate (count) data from vertical alignment to a sheet with existing data
    By cmokasak in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 08-24-2016, 04:54 AM
  3. [SOLVED] Userform Have Text Boxes Auto Populate Based on Combobox Selection & overwrite existing da
    By Rajesh shishodia in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-12-2015, 02:06 AM
  4. [SOLVED] Combobox to select existing customer and populate userform text box's
    By MallorcaPete in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-29-2015, 07:16 AM
  5. [SOLVED] VBA, Userform to dispaly the data existing in cells upon openining the userform
    By DCC_PD in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-27-2015, 10:39 AM
  6. Populate existing spreadsheet with new data
    By Coral-Reefer in forum Excel General
    Replies: 3
    Last Post: 01-28-2015, 09:43 AM
  7. [SOLVED] add 2 more frames to existing UserForm VBA to populate textboxes
    By chriswhite1982 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-05-2014, 05:47 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