Dim a() As String
Dim b() As String
Dim i As Integer
Dim j As Integer
Dim stra As String
Dim strb As String
a = Split(Me.Text1, ",")
b = Split(Me.Text2, ",")
For i = 0 To UBound(a)
For j = 0 To UBound(b)
If a(i) = b(j) Then
a(i) = ""
b(j) = ""
Exit For
End If
Next
If a(i) <> "" Then
stra = stra & a(i) & ","
End If
Next
Text1.Text = Left(stra, Len(stra) - 1)
For j = 0 To UBound(b)
If b(j) <> "" Then
strb = strb & b(j) & ","
End If
Next
Text2.Text = Left(strb, Len(strb) - 1)