vb 设计程序 要求能输入学生的学号、姓名、性别、年龄等个人简况,
2013-11-19
展开全部
Private Sub Cmd_Add_Click()
Dim SN01 As String, SN02 As String, SN03 As String, SN04 As String
SN01 = "学号:" & TexID.Text
SN02 = "姓名:" & TexName.Text
SN03 = "性别:" & TexSex.Text
SN04 = "年龄:" & TexAge.Text
Write_Record SN01, SN02, SN03, SN04
End SubPrivate Sub Write_Record(P_ID As String, P_Name As String, P_Sex As String, P_Age As String)
Open App.Path & "\个人简况.Text" For Output As #1
Print #1, P_ID
Print #1, P_Name
Print #1, P_Sex
Print #1, P_Age
Close #1
End Sub有其他需要,请随时回复!
Dim SN01 As String, SN02 As String, SN03 As String, SN04 As String
SN01 = "学号:" & TexID.Text
SN02 = "姓名:" & TexName.Text
SN03 = "性别:" & TexSex.Text
SN04 = "年龄:" & TexAge.Text
Write_Record SN01, SN02, SN03, SN04
End SubPrivate Sub Write_Record(P_ID As String, P_Name As String, P_Sex As String, P_Age As String)
Open App.Path & "\个人简况.Text" For Output As #1
Print #1, P_ID
Print #1, P_Name
Print #1, P_Sex
Print #1, P_Age
Close #1
End Sub有其他需要,请随时回复!
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询