主题:请问!!!?
Private Sub Command2_Click()
Dim newname As String
Dim status As String
Dim record As Integer
newname = InputBox("input the new file's name:")
Open newname For Random As #1 Len = Len(stu) //提示出错的语句
Do
stu.id = Val(InputBox("please input the student's ID"))
If stu.id <= 0 Then MsgBox ("Inavailable value,please reinput!")
Loop While stu.id > 0
Do While (status = "Y")
stu.name = InputBox("please input the student's name")
stu.score = Val(InputBox("please input the student's score"))
Put #1, record, stu
status = InputBox("do you want input another student's record?(y/n)")
If UCase(status) = "Y" Then
Do
stu.id = Val(InputBox("please input the student's ID"))
If stu.id <= 0 Then MsgBox ("Inavailable value,please reinput!")
Loop While stu.id > 0
Else
Exit Sub
End If
Loop
End Sub
哪位能给我说一下,我上面的程序段中,标出的那条语句,为什么老是提示参数出错呢。
这条语句在语法上并没有错误呀。
还请各位能相告一下。
Dim newname As String
Dim status As String
Dim record As Integer
newname = InputBox("input the new file's name:")
Open newname For Random As #1 Len = Len(stu) //提示出错的语句
Do
stu.id = Val(InputBox("please input the student's ID"))
If stu.id <= 0 Then MsgBox ("Inavailable value,please reinput!")
Loop While stu.id > 0
Do While (status = "Y")
stu.name = InputBox("please input the student's name")
stu.score = Val(InputBox("please input the student's score"))
Put #1, record, stu
status = InputBox("do you want input another student's record?(y/n)")
If UCase(status) = "Y" Then
Do
stu.id = Val(InputBox("please input the student's ID"))
If stu.id <= 0 Then MsgBox ("Inavailable value,please reinput!")
Loop While stu.id > 0
Else
Exit Sub
End If
Loop
End Sub
哪位能给我说一下,我上面的程序段中,标出的那条语句,为什么老是提示参数出错呢。
这条语句在语法上并没有错误呀。
还请各位能相告一下。