+ Reply to Thread
Results 1 to 5 of 5

Display contents of the listbox in a range

  1. #1
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Display contents of the listbox in a range

    Hi all,

    Assume you have a 3-columned ActiveX listbox on a worksheet. The contents within will be constantly changing: items added, removed, moved up and down etc. What I need is to display the contents of the listbox in range K3:K10 in a real time i.e. whatever change is made in a listbox, it is reflected in K3:K10.

    Any ideas gurus?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: Display contents of the listbox in a range

    See the answer to your PM
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Display contents of the listbox in a range

    Thanks TMShucks, great job!

    What TMShucks has suggested is to use StoreLists event. Solved!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,091

    Re: Display contents of the listbox in a range

    StoreLists isn't an event; it's a subroutine that I had developed to store the lists on workbook close. To achieve the real time effect, it is simply a case of calling the StoreLists subroutine from each of the "movement" subroutines. You then no longer need to call the code when the workbook closes as it has been keeping the (stored) lists up to date whenever there is a movement between or within the tables.

    I think the idea is very clever. It might be worth sharing the working solution for the benefit of others, crediting all the contributors.

    Regards, TMS

  5. #5
    Forum Contributor ABSTRAKTUS's Avatar
    Join Date
    04-18-2010
    Location
    England
    MS-Off Ver
    Win10 Excel 2016
    Posts
    609

    Re: Display contents of the listbox in a range

    Yes, I will make a sample workbook and post it here tomorrow so others have some visibility of the code. Thanks again TM.

+ 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