+ Reply to Thread
Results 1 to 5 of 5

Populate listbox from WS

  1. #1
    Registered User
    Join Date
    06-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    46

    Populate listbox from WS

    Hi there,

    I'm working on a system that enables the user to select 5 options from 5 different set of data (1 from each). The data sets can be found in excel worksheets.
    Because the data sets are changing over time, I would like to be able to ad to the data without having to go back to the VBA-editor.


    I thought I should start small and start with 1 data set. (ws."test".range (A1:A23)

    There is a lot of information available on the web, so I came up with some code based on my findings.

    Please Login or Register  to view this content.
    However, when I run this, the listbox remains empty. What am I missing/doing wrong? Any help is welcome!

  2. #2
    Registered User
    Join Date
    06-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Populate listbox from WS

    To add to that: I would like to use a userform, so I can group the different listboxes together (for now defined as "UserForm1")

  3. #3
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Populate listbox from WS

    Try this,

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  4. #4
    Registered User
    Join Date
    06-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Populate listbox from WS

    Like a charm! Thanks JanpanDave!

  5. #5
    Registered User
    Join Date
    06-03-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2010
    Posts
    46

    Re: Populate listbox from WS

    More problems with the same project.

    So I managed to define the different lisboxes in the same user form. Users can select 1 option in each listbox and then hit 'Save'.
    I then want the selected values to be copied to several desinated cells. I coppied the code below from a multiselect-listbox I used in a different project.
    It doesn't really work though. I gues the code isn't appropriate for a singleselect-listbox.
    Does anyone have any suggestions?

    Thanks!



    Please Login or Register  to view this content.
    NB: the value from lbtarget1 has to go to ws.("Data input").range.("H2")

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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