
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就行。
uj5u.com熱心網友回復:
ctListFiles是啥東東uj5u.com熱心網友回復:
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
uj5u.com熱心網友回復:
老大,你這么歷害為什么不早點出來。哈哈。。。。
轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/101124.html
標籤:VB基礎類
