list 判断删除
Private Sub Command1_Click()For i = 0 To List1.ListCount - 1
If InStr(List1.List(i), "错") Then
List1.RemoveItem i + 1
Else
If InStr(List1.List(List1.ListCount - 1), "错") Then
End If
End If
Next
End Sub
运行提示错误,该怎么样修改???
Private Sub Form_Load()
List1.AddItem "对"
List1.AddItem "对"
List1.AddItem "错"
List1.AddItem "对"
List1.AddItem "对"
List1.AddItem "错"
List1.AddItem "对"
List1.AddItem "对"
List1.AddItem "错"
List1.AddItem "对"
List1.AddItem "对"
List1.AddItem "对"
List1.AddItem "错"
List1.AddItem "对"
List1.AddItem "对"
List1.AddItem "错"
End Sub
找到方法了。。。
Private Sub Command1_Click()
For i = 0 To List1.ListCount - 1
If InStr(List1.List(i), "错") And i < List1.ListCount - 1 Then
List1.RemoveItem i + 1
End If
Next
End Sub
搞定。。。呵呵
[ 本帖最后由 z8571127 于 2015-2-11 22:24 编辑 ]