Results 1 to 8 of 8

multi select listbox, remove selected items.

Threaded View

  1. #1
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    gold coast
    MS-Off Ver
    Excel 2007
    Posts
    843

    multi select listbox, remove selected items.

    i have a multi select listbox that i want to be able to remove the selected items in one hit.
    i have not been able to convert code for removing single selected items and could not find a working example.

    cheers

    this is probley the closest though cos its removing items it plays havoc with the listcount
    Dim lItem As Long
    
        For lItem = 0 To Me.lstbx_Files.ListCount - 1
    
            If Me.lstbx_Files.Selected(lItem) = True Then
    
                Me.lstbx_Files.RemoveItem (lItem)
    
                'Me.lstbx_Files.Selected(lItem) = False
    
            End If
    
        Next

    ummm this may not bee a issue now.
    Excel had a fatal error and closed and now when it open the file i get errors accoured during load ok that and then it says that it removed the vba project part, is the a fix for this as i didnot have a backup copy of this file.
    I got one from the temp folder though it is a old file.
    Well i think i just learnt a valuable lesson.
    gotta love the things we hate at times
    System Volume Information, workbook is not diffrent from the last work.

    so i guess the question above about the listbox still stands, maby a couple hrs before ill be there though.
    Last edited by D_Rennie; 10-25-2009 at 05:46 AM.

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