用ckear方法
如:
List1.clear 这个是清空
或者RemoveItem方法
如:
list1.RemoveItem.序号
哈哈~注意看我是谁~
Private Sub Command1_Click()
For i = List1.ListCount - 1 To 1 Step -1
If List1.Selected(i) Then
List1.RemoveItem i
End If
Next i
End Sub
Private Sub Form_Load()
List1.AddItem "abc"
List1.AddItem "def"
List1.AddItem "ghi"
List1.AddItem "123"
List1.AddItem "456"
List1.AddItem "789"
List1.AddItem "~!@"
List1.AddItem "#$%"
List1.AddItem "^&*"
List1.AddItem "()_"
End Sub
dim i as integer
if list1.listcount<=0 then exit sub
for i=list1.listcount-1 to 0 step -1
if list1(i).selected then
list1.removeitem i
end if
next