Private Sub Command1_Click()
a = Split(Text1.Text, ",")
For i = 0 To UBound(a)
Print (a(i))
NextEnd Sub
a = Split(Text1.Text, ",")
For i = 0 To UBound(a)
Print (a(i))
NextEnd Sub
调试欢乐多
a = Split(Text1.Text, ",")
For i = 0 To UBound(a)
text2.txt=a(i)
NextEnd Sub
---不行啊,只能出现最后一个数字06在第二个文本框01,02,03,04,05,06
需要分割为
01
02
03
04
05
06
a = Split(Text1.Text, ",")
For i = 0 To UBound(a)
text2.text=text2.text & a(i) & vbcrlf
NextEnd Sub
1\扔入一个 text1 和 一个 command1 到form1中
2\复制如下代码看执行效果:
--------------------
Option ExplicitPrivate Sub Command1_Click()
Dim a() As String
Dim b As String
Dim i As Integer
a = Split(Text1, ",")
For i = 0 To UBound(a)
b = b & a(i) & vbCrLf
Open App.Path & "\1.txt" For Output As #1
Print #1, b
Close #1
Next i
Shell "notepad.exe " & App.Path & "\1.txt", 1End SubPrivate Sub Form_Load()
Command1.Caption = "分割"",""号输出到文本并打开文本"
Command1.Width = 3000
End Sub
---------------------------
cike技术交流群 16874787