+ Reply to Thread
Results 1 to 10 of 10

Listbox Multiselect

  1. #1
    Forum Contributor
    Join Date
    01-21-2021
    Location
    Leeds
    MS-Off Ver
    2016
    Posts
    236

    Listbox Multiselect

    Thanks for looking at my post.
    With help of this forum i manage to get solution for most of the issues. Thanks for that and greatly appreciate that.
    Now the issue is I have 2 list boxes. Users can move selected partnumbers from listbox1 to 2.
    I got stuck in the listbox 2 as i wanted to do multiple select option and get corresponding results in Frame 2 please.
    At the moment Frame 2 is pulling only one selected item from Listbox2. Is there any possibilities for frame 2 to bring results from one or multiple selected items from listbox 2 selection please?

    I have attached excel for your reference.

    Any help will be appreciated.
    Thanks,
    Jim
    Attached Files Attached Files

  2. #2
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Listbox Multiselect

    Give the attached a go.
    I gave up trying to incorporate into your form.
    There was conflicting loading of your listbox.
    You had initially loaded with 'rowsource' then appeared to be doing a second load with 'visible cells' (did not make sense to me).
    However, just my opinion, 'rowsource' is the last method to resort to, with loading a fixed range you had loaded 94 rows of emptiness.
    I have loaded the first listbox from a table - loads in the initialisation event - nothing loaded in the listbox properties window.
    Any queries post back on this site.
    torachan.
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    01-21-2021
    Location
    Leeds
    MS-Off Ver
    2016
    Posts
    236

    Re: Listbox Multiselect

    Thanks a lot for your time and effort. I managed to use your excel as the base for my design. Issue where I got stuck is in "Frame2" in the userform. Either I get one part number data or I don't get any. When I remove multiselect option from listbox2 I don't get any data in the frame 2 and when I put back the multiselect option I get value in the frame 2 only for one part number which I am clicking at last. Is there any possibilities to figure out where I am going wrong in the code for Frame 2 please? I need to select one or more part numbers from listbox 2 and I would like to get corresponding information for those part numbers in the Frame 2 please. I have attached two screenshot of errors, one is no data if listbox2 is in multiselect and other one is only one set of partnumber information rather than multiple information.
    Thanks and much appreciate your help
    Jim
    Attached Images Attached Images
    Attached Files Attached Files

  4. #4
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Listbox Multiselect

    Firstly, we must discount your listbox code, it is never going to work in the manner I believe you want.
    If I am understanding you, you want to display the multiple choices in the relative textboxes.
    As I see it there are two choices - you use a group of textboxes for EACH choice - or you concatenate the choices in each textbox.
    The latter would appear somewhat jumbled and almost pointless as an easily read piece of information.
    A little more information on what you are trying to achieve and its purpose would help us to give you more meaningful advice.
    torachan.

  5. #5
    Forum Contributor
    Join Date
    01-21-2021
    Location
    Leeds
    MS-Off Ver
    2016
    Posts
    236

    Re: Listbox Multiselect

    Thanks a lot for your reply

    Basically I have "Labour time" sheet with list of tasks performed for each part numbers along with time taken for each tasks. What I am looking for is to understand how long each partnumbers and its tasks taking to finish the job. This is where "Frame2" in the userform come into action. "Totaltime" will hold information from "Labour time" sheet column C and D for the part number selected. "Longest mins" will see column C and D and find which is the longest mins. "Shortest mins" will see column C and D and find which is the shortest mins. "Longest minus shortest" is just formula.
    Now the issue is either I want either one list box or 2 listbox (does not matter to be honest), when the user select multiple part number I wanted to get "Total time" for those multiple part numbers, "Longest mins" for those selected part numbers and so on. Example if user select "1" the "Total time" will be 290, "Longest mins" will be 60 and "shortes mins" will be 2 and "Longest minus shortest" will be 58 which is working fine. But when user select another part number example "888" along with partnumber "1" I should get total time for both these part numbers in total, Longest mins will be calculated for both "888" and "1", etc...
    Hope I made sense.
    Please let me know if I am confusing
    thanks a lot again

  6. #6
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Listbox Multiselect

    Hi, for me to give solutions I have to understand the rationale behind the thinking.
    I have spent many years dealing with production environments of one nature or another.
    The basics of production run-times was always ((quantity x piece part time) + total setup time).
    The fact you are not considering 'quantity' to my mind is baffling, what purpose do the numbers you are producing perform.
    At the moment I can see little purpose in this exercise, please explain so that I can understand.
    torachan.

  7. #7
    Forum Contributor
    Join Date
    01-21-2021
    Location
    Leeds
    MS-Off Ver
    2016
    Posts
    236

    Re: Listbox Multiselect

    Hi,
    Thanks for your reply. The idea is we looking to understand operator workload. We wanted to understand which operator is doing more work and wanted to split the workload between operators.
    Thanks

  8. #8
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Listbox Multiselect

    Try the attached to see how close this is to a solution.
    Rarely do I do anything that I cannot understand the purpose of what I have done.
    If any part of this is near what you want I will then annotate the code for your understanding.
    Note there is only one data sheet (Labour time) all the information is taken from it.
    torachan.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    01-21-2021
    Location
    Leeds
    MS-Off Ver
    2016
    Posts
    236

    Re: Listbox Multiselect

    wow that's perfect. Much appreciated for your help

    Thanks again

  10. #10
    Forum Expert torachan's Avatar
    Join Date
    12-27-2012
    Location
    market harborough, england
    MS-Off Ver
    Excel 2010
    Posts
    4,303

    Re: Listbox Multiselect

    thanks for the feedback.
    glad to have helped.
    torachan.

+ 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. 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
  2. Multiselect ListBox can't find the name
    By ChrisNor in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 10-09-2009, 09:50 AM
  3. Listbox (MultiSelect)
    By CobraLAD in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-13-2008, 11:58 PM
  4. [SOLVED] Multiselect Listbox use
    By RKS in forum Excel General
    Replies: 1
    Last Post: 05-12-2006, 10:10 AM
  5. [SOLVED] Bug in multiselect listbox?
    By Jos Vens in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-08-2006, 04:45 PM
  6. multiselect listbox backcolor
    By Russ in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-01-2005, 07:05 PM
  7. Action on Multiselect Listbox
    By Sige in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-17-2005, 03:06 AM

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