主题:把字符输出到我的txt文件中,怎么看不到,高手指点,代码如下
Private Sub CommandButton1_Click()
For i = 0 To 99
strfile = ""
str(i, 0) = TextBox1.Text
str(i, 1) = TextBox2.Text
str(i, 2) = TextBox3.Text
str(i, 3) = TextBox4.Text
str(i, 4) = TextBox5.Text
For j = 0 To 4
strfile = strfile & str(i, j) & " "
Next
strfile = strfile & vbCrLf
Open "D:\1.txt" For Output As #1
Print #1, strfile
Close #1
TextBox1.Text = " "
TextBox2.Text = " "
TextBox3.Text = " "
TextBox4.Text = " "
TextBox5.Text = " "
Next
End Sub
For i = 0 To 99
strfile = ""
str(i, 0) = TextBox1.Text
str(i, 1) = TextBox2.Text
str(i, 2) = TextBox3.Text
str(i, 3) = TextBox4.Text
str(i, 4) = TextBox5.Text
For j = 0 To 4
strfile = strfile & str(i, j) & " "
Next
strfile = strfile & vbCrLf
Open "D:\1.txt" For Output As #1
Print #1, strfile
Close #1
TextBox1.Text = " "
TextBox2.Text = " "
TextBox3.Text = " "
TextBox4.Text = " "
TextBox5.Text = " "
Next
End Sub