单项选择题

假定在工程文件中有一个标准模块,其中定义了如下记录类型:
Type Books
Name As Stri ng*10
TelNum As Stri ng*20
End Type
要求在执行事件过程Co mmand1_Click 时,在顺序文件Person .txt 中写入一条记录。下列能够完成该操作的事件过程是(  )。

A.Private Sub Co mmand1_Click() Di nt BAs Books Open "c :\Person .txt"For Output As #1 B .Name =InputBox("输入姓名") B .TelNum=InputBox("输入电话号码") Write #1,B.Name ,B.TelNum Close #1End Sub
B.Private Sub Co mmand1_Click()Di m BAs Books Open "c :\Person .txt"For Input As #1 B .Name =InputBox("输入姓名") B .TelNum=InputBox("输入电话号码") Print #1,B.Name ,B.TelNum Close #1End Sub
C.Private Sub Co mmand1_Click()Di m BAs Books Open "c :\Person .txt"For Output As #1 Name =InputBox("输入姓名") TelNo m=InputBox("输入电话号码") Write #1,B Close #1End Sub
D.Private Sub Co mmand1_Click() Di m BAs BookOpen "c :\Person .txt"For Input As #1 Name =InputBox("输入姓名") TelNum-InputBox("输入电话号码") Print #1,B.Name .B.TelNumClose #1End Sub