+ Reply to Thread
Results 1 to 2 of 2

Populating selected Items From Database field for multiselect listbox

  1. #1
    Registered User
    Join Date
    12-10-2018
    Location
    Huntsville, AL
    MS-Off Ver
    Office 365
    Posts
    11

    Question Populating selected Items From Database field for multiselect listbox

    I have a userform that contains a listbox. I populate the listbox with specific items during the Userform1 initialize.

    On the userform, I have command buttons that allow me to move to next and previous records. During the click module, the record gets loaded into the appropriate userform fields.
    For the record, I have a field that contains several of the listbox items and they are separated by commas. I need to extract that field and identify which ones are in the listbox so that it can be highlighted as a selected value when the user sees it.

    Here's an example:

    The listbox has: hat
    gloves
    mittens
    coat
    sweater
    boots

    Field1 in the record has hat,gloves,coat

    I want the listbox to display the hat
    gloves
    mittens
    coat
    sweater
    boots

    hat
    gloves
    and coat should be highlighted as selected.
    How can I do this???

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: Populating selected Items From Database field for multiselect listbox

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

+ 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] Storing selected items index from multiselect listbox into array
    By Pamela2411 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2015, 06:55 PM
  2. [SOLVED] Return row index of selected items in multicolumn multiselect listbox
    By CaptainK in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-01-2014, 09:19 AM
  3. [SOLVED] UF - sending multiselect listbox data to database
    By Raanan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-25-2013, 12:03 PM
  4. Copy Selected items from multicolumn, multiselect listbox to another listbox
    By Willigb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-19-2013, 11:27 AM
  5. [SOLVED] Populating an array with selected ListBox items
    By wz4np1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-13-2012, 07:52 AM
  6. Multiselect ListBox - Active/Inactive Items
    By LCK in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-02-2005, 08:45 PM
  7. [SOLVED] Multiselect ListBox - Active/Inactive Items
    By LCK in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-02-2005, 06:17 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