给你一段代码:
Private Sub Form_Load()
Open "c:\test.txt" For Input As #1
a = StrConv(InputB(LOF(1), 1), vbUnicode)
Text1.Text = a
Close #1
End Sub
Private Sub Command1_Click()
str1 = Text1.Text
i = 1
Do While InStr(str1, vbCrLf) > 0
Text3.Text = ""
For j = 1 To 10
where1 = Len(str1)
where2 = InStr(str1, vbCrLf)
result = Mid(str1, 1, where2 - 1)
Text3.Text = Text3.Text & result & vbCrLf
'
Text3 为结果
str1 = Mid(str1, where2 + 1, where1 - where2)
If Len(str1) < 2 Then Exit For
Next
Open "c:\test" & i & ".txt" For Output As #2
Print #2, StrConv(Text3.Text, 8)
Close #2
i = i + 1
Loop
End Sub
Private Sub Command2_Click()
Unload Me
End
End Sub