我想做一个【手机号自动分类】
有2个文本框和一个按钮
文本框1里有移动号码和联通号码前提是:每个手机号为一行点击按钮后,文本框1里的移动号全部复制到文本框2里去假设文本框里有13999999999和13333333333
点击按钮后文本框1里的13999999999复制到文本框2里去。
有2个文本框和一个按钮
文本框1里有移动号码和联通号码前提是:每个手机号为一行点击按钮后,文本框1里的移动号全部复制到文本框2里去假设文本框里有13999999999和13333333333
点击按钮后文本框1里的13999999999复制到文本框2里去。
TextBox1.Text = "13999999999" & vbCrLf & _
"13333333333" & vbCrLf & _
"13934435345" & vbCrLf & _
"13335234566"
End Sub Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim s As String
Dim s1 As String = ""
Dim i As Short
s = TextBox1.Text
Dim a() As String = s.Split(vbCrLf)
For i = 0 To UBound(a)
a(i) = a(i).Replace(vbLf, "")
If a(i).Substring(0, 3) = "139" Then
s1 = s1 & a(i) & vbCrLf
End If
Next
TextBox2.Text = s1
End Sub
End Class