vb中实时错误5 无效的调用过程或参数 在线等

List1.RemoveItem (List1.ListIndex)
2025-02-02 21:40:55
推荐回答(3个)
回答1:

List1.ListIndex 是选择项的索引. 如果你没选择 或者list1是空的, 它返回-1
list1.removeitem(-1)就会返回这个错误.

回答2:

如果没有选中项目,那List1.ListIndex就是-1 ,这样就会错误。前面加一句 :on error resume next

, 忽略错误。

回答3:

大小写不对?拼写错误?