+ Reply to Thread
Results 1 to 7 of 7

Managing multiple listboxes with one code

  1. #1
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    862

    Managing multiple listboxes with one code

    Hi everyone
    Because in my worksheet I have 10 listboxes i had to write ten such codes:

    Please Login or Register  to view this content.
    I'm trying to replace these 10 codes with something like :

    Please Login or Register  to view this content.
    wich isn't working... maybe you guys can help me with that?

    thanks alot!

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: Managing multiple listboxes with one code

    Try:-
    Please Login or Register  to view this content.

  3. #3
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Managing multiple listboxes with one code

    What type of listboxes are they?

    Can you attach a sample workbook.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic
    If posting code please use code tags, see here.

  4. #4
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    862

    Re: Managing multiple listboxes with one code

    ok! thanks Mick! this is woriking perfect!
    now the problem escalates on 10 times LostFocus code and following that ideea...

    Please Login or Register  to view this content.
    is it possible to..

    Please Login or Register  to view this content.
    and because we dont know target.row maybe we can find it out from the position of the listbox on the sheet?
    thanks anyway! you are great!

  5. #5
    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: Managing multiple listboxes with one code

    Hello bulina2k,

    Welcome to the Forum!

    If you post your workbook it will be easier to create a working solution.
    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!)

  6. #6
    Valued Forum Contributor bulina2k's Avatar
    Join Date
    11-20-2012
    Location
    Urziceni, Ialomita, Romania
    MS-Off Ver
    2019 and 365
    Posts
    862

    Re: Managing multiple listboxes with one code

    Hi again,
    I chopped the file so now it contains only the relevant code.
    thanks alot
    Attached Files Attached Files

  7. #7
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Managing multiple listboxes with one code

    Why do you have 10 listboxes?

    Can't you have one listbox?

    You could display that next to the relevant cell and populate it with the relevant data.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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