Private Sub Form_Click()
Open "e:\stu.dat" For Output As #1
n = Val(InputBox("输入要录入信息学生的个数n", "人数"))
For i = 1 To n
stname = InputBox("姓名")
num = InputBox("学号")
sc1 = Val(InputBox("第一门课的成绩"))
sc2 = Val(InputBox("第二门课的成绩"))
sc3 = Val(InputBox("第三门课的成绩"))
Write #1, stname, num, sc1, sc2, sc3
Next i
Close #1
End Sub
鼠左点一下头
open "e:\1.txt" for input as # 1
.........................
close # 1