I also trying to remove an item from a listbox. It works fine when a select any item except the last one listed.
When I select the last item to remove all items in the listbox are removed
here is the code
![]()
For iCnt = Me.ListBox1.ListCount - 1 To 0 Step -1 If Me.ListBox1.Selected(iCnt) = True Then Me.ListBox1.RemoveItem iCnt End If Next
Bookmarks