首页上一页 1 下一页尾页 1 条记录 1/1页
请教text 有关问题
发表在VB答疑区
2009-03-26
是否精华
是
否
版块置顶:
是
否
有三个文本框分别为text1,text2,text3及一个command1,并在text1,text2中输入数字,要求在text3中显示text1过滤掉text1和text2中相同的数字后的结果.如text1中数字为1,2,3,4. text2中数字为2,5,6,7,8 text3中则显示为1,3,4
我在command1中编写了如下程序,但运行后,text3text1显示一样,请指教.
Private Sub Command16_Click()
Dim a
a = Split(Text1.Text, vbCrLf)
For i = 0 To UBound(a)
Next i
Dim b
b = Split(Text2.Text, vbCrLf)
For j = 0 To UBound(b)
Next j
Dim s
Dim p
For Each p In a
For Each s In b
If p = s Then GoTo f:
Next s
Text3.Text = Text3.Text & p & ""
f:
Next p
End Sub
我在command1中编写了如下程序,但运行后,text3text1显示一样,请指教.
Private Sub Command16_Click()
Dim a
a = Split(Text1.Text, vbCrLf)
For i = 0 To UBound(a)
Next i
Dim b
b = Split(Text2.Text, vbCrLf)
For j = 0 To UBound(b)
Next j
Dim s
Dim p
For Each p In a
For Each s In b
If p = s Then GoTo f:
Next s
Text3.Text = Text3.Text & p & ""
f:
Next p
End Sub