+ Reply to Thread
Results 1 to 7 of 7

Listbox problem

  1. #1
    Registered User
    Join Date
    07-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    16

    Listbox problem

    Hi all,

    I have a slight problem with list box.I have 2 multiselect listbox which wil go into respective cells along with other data.
    Listbox 1- time
    Listbox 2 - Product name

    everything works fine except,both the cells are populating product name alone.

    Please check the code below and let me know where I've gone wrong.

    Please Login or Register  to view this content.

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,176

    Re: Listbox problem

    Other than reseting the variable MSG between loops the code looks okay.

    Are you sure the contents of ws.Cells(lRow, 7).Value does not contain both Product AND Time data?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    07-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Listbox problem

    I got it working by declaring msg1 .
    thank you andy
    I just want to know if i want to pass the value as sum of 'listbox selected items' into an excel sheet. is it possible?
    Example- User selects time as 1, 2... but I want to pass it as sum of the time selected [ie, 3].

  4. #4
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,176

    Re: Listbox problem

    if the listbox has numeric values, as text, you can sum in the code

    Please Login or Register  to view this content.

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,176

    Re: Listbox problem

    if the listbox has numeric values, as text, you can sum in the code

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    07-10-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Listbox problem

    Thank you ... Thank you..thank you... !

    It worked perfectly!

  7. #7
    Forum Moderator Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Listbox problem

    Based on your last post in this thread, its apparent that you are satisfied with the solution(s) you've received and have solved your question, but you haven't marked your thread as "SOLVED". I will do it for you this time.

    In future, to mark your thread as Solved, you can do the following -
    Select Thread Tools-> Mark thread as Solved.

    Incase your issue is not solved, you can undo it as follows -
    Select Thread Tools-> Mark thread as Unsolved.

    Also, since you are relatively new to the forum, i would like to inform you that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post which helped you. This adds to the reputation of the person who has taken the time to help you.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

+ 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] problem with listbox output to another listbox
    By AndyE in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 05-02-2013, 04:52 AM
  2. Listbox to Listbox, no duplicates & submitting same UserForm data for each Listbox entry.
    By jamieswift1977 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-18-2012, 12:18 PM
  3. listbox problem
    By thy00123 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-03-2009, 02:52 AM
  4. ListBox Problem
    By Jl9r in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-05-2008, 03:08 AM
  5. listbox problem #2
    By Keith in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-12-2005, 02:06 PM

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