For j = 0 To ctListFiles.ListCount - 1
For i = lstLove.ListCount - 1 To 0 Step -1
If ctListFiles.CellText(j, 1) = lstLove.CellText(i, 1) Then
lstLove.RemoveItem i
Else
ctListFiles.AddItem lstLove.CellText(i, 1)
lstLove.RemoveItem i
End If
Next
Next
我想取的结果是,如果从lstLove到ctlistfiles表,ctlistfiles中存在的直接删除,不存在的增加进去。
实列可下载附件把JPG改成RAR就行。
For i = lstLove.ListCount - 1 To 0 Step -1
If ctListFiles.CellText(j, 1) = lstLove.CellText(i, 1) Then
lstLove.RemoveItem i
Else
ctListFiles.AddItem lstLove.CellText(i, 1)
lstLove.RemoveItem i
End If
Next
Next
我想取的结果是,如果从lstLove到ctlistfiles表,ctlistfiles中存在的直接删除,不存在的增加进去。
实列可下载附件把JPG改成RAR就行。
Do Until lstLove.ListCount = 0
For i = 0 To ctListFiles.ListCount - 1
If ctListFiles.CellText(i, 1) <> lstLove.CellText(0, 1) Then
ctListFiles.AddItem lstLove.CellText(0, 1)
End If
lstLove.RemoveItem 0
Next
Loop