+ Reply to Thread
Results 1 to 3 of 3

How to save ListBox Multiselect to Registry

  1. #1
    Registered User
    Join Date
    11-07-2017
    Location
    Austin, TX
    MS-Off Ver
    2010
    Posts
    22

    Exclamation How to save ListBox Multiselect to Registry

    Hello,
    I have a multipage userform that has a dozen ListBoxes -- all with MultiSelect. I've saved the selections to a spreadsheet (1 row for each ListBox, each selection in adjacent columns).
    However, when the User reopens the survey, the selections on the userform are all gone.
    How can I save the selections to the Registry so that when the User reopens the userform, the ListBox selections show up?

    Thanks in advance for your help.

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

    Re: How to save ListBox Multiselect to Registry

    You could read them from the spreadsheet in the Userform_Initialize procedure.

    Example

    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.

  3. #3
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,125

    Re: How to save ListBox Multiselect to Registry

    You could store them as a customer property.

    Each listbox name would be use to store a string of CSV for later use.

    Each CSV would represent the selected value in the listbox.

    If you had a list of ten in Listbox1 and 1,3 7 items are selected, this would generate a CSV like:

    Listbox1,1,3,7

    which you can parse later with the Split function.

    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

+ 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. Change a multiselect listbox
    By Yokosuka in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-11-2016, 08:37 AM
  2. [SOLVED] Values from MultiSelect ListBox
    By BVT3030 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-08-2015, 10:56 PM
  3. 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
  4. Listbox (MultiSelect)
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2008, 11:58 PM
  5. [SOLVED] Multiselect Listbox use
    By RKS in forum Excel General
    Replies: 1
    Last Post: 05-12-2006, 10:10 AM
  6. [SOLVED] Bug in multiselect listbox?
    By Jos Vens in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2006, 04:45 PM
  7. [SOLVED] Last Selection from MultiSelect Listbox
    By Brian in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-03-2005, 03:15 AM

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