+ Reply to Thread
Results 1 to 1 of 1

VBA code to populate listbox selections for an existing record in a userform

  1. #1
    Registered User
    Join Date
    07-12-2019
    Location
    US
    MS-Off Ver
    Office 2016
    Posts
    1

    VBA code to populate listbox selections for an existing record in a userform

    Hello~

    I have created a userform called CandidateForm that will be used to add new candidates to a tracker/log, but I also want to be able to search and find an existing record, pull in the existing values, edit and then save the changes back to the existing record in the worksheet. I have several different types of fields in the userform and all are working except for the 2 multiselect listbox fields (lstPrefShift and lstUnavailable).

    I'm able to select and record the listbox selections when it is a new record. I can update the records, however, I'm not sure my approach is the best but it is working. What I need help with is VBA code to populate the listbox selections back in the userform when I search and find an existing record. I want the userform to tell me if any shift preferences had been selected previously and then allow me to edit those selections if necessary. The other piece I'd like to accomplish is setting a default value for the the listbox fields if no selections are made. So for Shift Preferred it would be Any and Unavailable shift it would be None.

    I have attached sample data in the spreadsheet I'm working on. There are 2 forms in the workbook, but I'm only needing help on the CandidateForm. I'm using Excel 2016.

    Thanks in advance for your help!

    Melynda
    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. [SOLVED] Multi Select ListBox selections to populate TextBox in list form
    By Tarena in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-26-2018, 10:30 AM
  2. Get selections of multi select listbox on a userform
    By jolivanes in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-29-2017, 01:17 PM
  3. [SOLVED] Delay in loading selections in userform listbox
    By kosherboy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-18-2016, 08:49 PM
  4. Userform ListBox that recalls prior selections made
    By fil_oliveira in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-19-2016, 10:11 PM
  5. VBA - Populate Listbox based on value selected in another ListBox (On Userform)
    By raaboo in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-12-2012, 11:18 AM
  6. [SOLVED] Populate word document with listbox selections
    By AndyE in forum Word Programming / VBA / Macros
    Replies: 18
    Last Post: 08-24-2012, 09:00 AM
  7. Userform ListBox that recalls prior selections made
    By skysurfer in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-08-2010, 02:54 PM

Tags for this Thread

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