Joe;
Deleting by either index or key will usually work. Doesn't matter which one
you choose. But I resort the listview on dates and numbers using API and
callbacks. That scrambles the listitems collection and thus neither the
index or the key will work. The only solution I have found is to
temporarily resort the listview with the stock text sorting and then delete
by key...
Cheers,
Bill
Quote:
> Must delete index before listItem can be removed from listItems collection
> This should do it
> ListView.ListItems.Remove ListView.SelectedItem.Index
> Joe
> > Hi:
> > I am using VB6. In code to remove a listview item, I remove by
> > listview.ListItems.Remove StringKey
> > Where StringKey is a valid key for a listitem in the listitems
collection.
> > No error is raised, but the item is not removed. It is driving me even
more
> > crazy. Does anyone have any idea as to why the item is not being
removed.
> > I have tried called listview.refresh etc. Doesn't help.
> > TIA,
> > Bill