'Private Sub Form_Load()
'Randomize
'For i = 0 To 10
'List1.AddItem Str(Int(Rnd * 50))
'Next
'For j = 0 To 20
'List2.AddItem Str(Int(Rnd * 50))
'Next
'End Sub
Sub compare(ByVal List1 As ListBox, ByVal List2 As ListBox)
For i = 0 To List1.ListCount - 1
For j = 0 To List2.ListCount - 1
If List2.List(j) = List1.List(i) Then GoTo existsame
Next j
List3.AddItem List1.List(i)
existsame:
Next i
End Sub
Private Sub Command1_Click()
List3.Clear
compare List1, List2
compare List2, List1
End Sub