Private Sub Command1_Click()
Dim a As Integer, i As Integer,
For i = 0 To List2.ListCount - 1
If List2.Selected(i) Then
For j = 0 To List1.ListCount - 1
If List2.List(i) = List1.List(j) Then
MsgBox List2.List(i) & "已经选过了"
Exit For
End If
Next j
If j = List1.ListCount Then List1.AddItem List2.List(i)
a = a + 1
End If
Next i
If a = 0 Then MsgBox "请在右边的文本框中选择项目"
End Sub
我是用的是逐条判断法