+ Reply to Thread
Results 1 to 6 of 6

Select multiple items from a list and enter into on cell

  1. #1
    Registered User
    Join Date
    11-22-2010
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Select multiple items from a list and enter into on cell

    Hi all,

    What I have is a form with a list box of employees. I want to be able to select multiple employees from the list box and place then on a worksheet into 1 cell seperated by a comma.

    I've managed to complete some of the problem, as I can multiple select and enter into a cell but i'm limited to an exact number of employees. Code is for 3 employees selected where the actual number that can be selected can varry. Below is what I am using so far.

    TIA,
    FeralzDad

    Please Login or Register  to view this content.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Select multiple items from a list and enter into on cell

    Hello FeralzDad,

    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Registered User
    Join Date
    11-22-2010
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Select multiple items from a list and enter into on cell

    Thanks Leith for your quick response.

    I copied your code and fixed up a couple of typos (lItem) but I'm getting a Type mismatch error on the redim line from the the colon onward.

    Please Login or Register  to view this content.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Select multiple items from a list and enter into on cell

    Hello Feralzdad,

    Sorry about the typos. I have an eye exam next week. Getting new glasses should help. I forgot the index value to the array. Here is the correction.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-22-2010
    Location
    Newcastle, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    [SOLVED] Re: Select multiple items from a list and enter into on cell

    Fantastic!!

    Thanks for your help, hope the eye exam goes well!! :-)
    Last edited by FeralzDad; 11-22-2010 at 08:53 PM. Reason: [SOLVED]

  6. #6
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Select multiple items from a list and enter into on cell

    Hello FeralzDad,

    This version of the macro should remove the extra commas in the string.
    Please Login or Register  to view this content.

+ 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