How to delete selected item from listbox?

Hello.

I filled out the listbox and then try to remove some strings from it. How I can do that?

SolidworksApi macros
Answers 2
IK
IK 2015-11-13 Best Answer
<p>For I = ListBox1.ListCount - 1 To 0 Step -1</p><p>    If ListBox1.List(I) = "some string" Then</p><p>        Me.ListBox1.RemoveItem (I)</p><p>    End If</p><p>Next I</p>
VM
VM 2015-11-13

Thank you, Ivana!

It works great!