怎样将两个文本框中不同的数找出来并显是在第三个文本框中?用vb亚博真人游戏。

以下代码调试通过,注意数字间用空格隔开

Private Sub Command1_Click()
Dim numArr1
Dim numArr2
Dim i As Integer
numArr1 = Split(Text1.Text, " ") ‘如果用逗号隔开就应该是Split(Text1.Text,",")
numArr2 = Split(Text2.Text, " ")
For i = 0 To UBound(numArr1)
If InStr(Text2.Text, numArr1(i)) = 0 Then Text3.Text = Text3.Text & numArr1(i) & " "
Next
For i = 0 To UBound(numArr2)
If InStr(Text1.Text, numArr2(i)) = 0 Then Text3.Text = Text3.Text & numArr2(i) & " "
Next
End Sub
http://zhidao.baidu.com/question/334297191.html