11

Is there any way to remove item from listbox based on it's name but not index value? I would like to remove item named "Mouse" (which index # changes all the time).

stukelly
  • 4,257
  • 3
  • 37
  • 44
Tom
  • 331
  • 2
  • 4
  • 13

1 Answers1

22
listBox.Items.Delete(listbox.Items.IndexOf('Mouse'));
Mason Wheeler
  • 82,511
  • 50
  • 270
  • 477