+ Reply to Thread
Results 1 to 3 of 3

Populating Userform controls with ListBox selecton

  1. #1
    Forum Contributor
    Join Date
    04-07-2015
    Location
    Halifax, NS
    MS-Off Ver
    365
    Posts
    100

    Populating Userform controls with ListBox selecton

    Hello again,
    I have a form to enter recipes. The ingredients for the recipe come from a table called "tblProducts". I need to be able to edit the recipes in the table so I have a ListBox at the top of the form. (See image below). My problem is this; When I dblClick the item, all fields are populating correctly except the ingredients. I have unhidden columns in the ListBox for trouble shooting purposes. I will only show the name and date. As you can see, the record number is correct and because the ListBox has the information, I assume that the problem lies with the underlying code of the ListBox (show below). FYI, I have code on the form initialization to populate the ComboBoxes for new entries, also included below. I have spent over 8 hours trying to find the problem so I need help.
    RecipeForm.png

    The code behind the ListBox is:
    Please Login or Register  to view this content.
    The code on the form initialization to populate the ingredient list boxes is: (it populates them ComboBoxes no problem but I'm not sure it doesn't interfere with populating from the listbox )

    Please Login or Register  to view this content.

  2. #2
    Forum Expert BadlySpelledBuoy's Avatar
    Join Date
    06-14-2013
    Location
    East Sussex, UK
    MS-Off Ver
    365
    Posts
    7,468

    Re: Populating Userform controls with ListBox selecton

    Could we see the workbook? Far easier to diagnose an issue that way.

    BSB

  3. #3
    Forum Contributor
    Join Date
    04-07-2015
    Location
    Halifax, NS
    MS-Off Ver
    365
    Posts
    100

    Re: Populating Userform controls with ListBox selecton

    Since I posted, I comment out the code on form initialization and the form populated fine. Then I added the RowSource to the comboboxes on the form and same thing again, did not populate. The difference between the rowsource for the other comboboxes on the form is that the values come from dynamic lists on Sheet "Lists" whereas the one for the ingredients comes from a named table range.

    Here is a copy of the file.

    I have another question but it is related to a different subject so will post in a new thread.
    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. Replies: 6
    Last Post: 11-11-2015, 12:50 PM
  2. Populating a Userform from data in a listbox
    By needhelpinexcelvba in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-05-2014, 10:15 AM
  3. [SOLVED] Populating a UserForm ListBox with all Open workbooks
    By JoshExcel in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 03-09-2014, 09:30 PM
  4. two listbox populating on userform for chartrange
    By kmsoni in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-28-2011, 11:36 AM
  5. listbox populating on userform
    By kmsoni in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-23-2011, 11:18 AM
  6. Populating a userform listbox from a database
    By James_B in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 02-12-2010, 02:16 PM
  7. [SOLVED] Userform: listbox and controls' data entry validation
    By sebastienm in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-15-2005, 09:05 AM

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