照书上打下来的,但报错说实时错误'424',要求对象
Type recordtypename As String
age As Integer
tel As String
End Type
Dim number As Integer
Dim recordw As recordtype
Private Sub Form_click()
Open "e:\tel.txt" For Random As #1 Len = Len(recordw)
number = LOF(1) / Len(recordw)
enter = Chr$(13) + Chr$(10)
msg$ = "1.建立文件"
msg$ = msg$ + enter + enter + "请选择操作"
resp = InputBox(msg$)
Select Case resp
Case 1
file_write
End Select
End Sub
Sub file_write()
Do
recordw.name = InputBox$("enter name")
recordw.age = InputBox("enter age")
recordw.tel = InputBox$("enter tel")
number = number + 1
Put #1, number, recordw
Loop Until recordw.name = "done"
End Sub
请教一下为什么会出错?