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
Bookmarks