声明字符与声明的数据类型不符合(详见)

来源:百度知道 编辑:UC知道 时间:2024/06/19 18:06:03
Private Sub Form_Click()
msg1$ = "请输入姓名"
msgtitle = "学生情况登记"
msg2$ = "请输入年龄:"
msg3$ = "请输入性别:"
msg4$ = "请输入籍贯"
studname$ = InputBox(msg1$, msgtitle$)
studage = InputBox(msg2$, msgtitle$)
studsex$ = InputBox(msg3$, msgtitle$)
studhome$ = InputBox(msg4$, msgtitle$)
Cls
Print studname$; ","; studsex$; ",现年";
Print studage; "岁"; ","; studhome$; "人"
End Sub
最好帮我指出一下哪里的问题啊。

Private Sub Form_Click()
msg1$ = "请输入姓名"
msgtitle = "学生情况登记"
msg2$ = "请输入年龄:"
msg3$ = "请输入性别:"
msg4$ = "请输入籍贯"
studname$ = InputBox(msg1$, msgtitle)
studage = InputBox(msg2$, msgtitle)
studsex$ = InputBox(msg3$, msgtitle)
studhome$ = InputBox(msg4$, msgtitle)
Cls
Print studname$; ","; studsex$; ",现年";
Print studage; "岁"; ","; studhome$; "人"
End Sub

不符合就自己转一下嘛,
str 数字转字符
num 字符转数字