第1个回答 2014-09-26
Private Sub Command1_Click()
Dim xm, xh, zy
xm = InputBox("请输入姓名")
xh = InputBox("请输入学号", , "2013054001")
zy = InputBox("请输入专业")
MsgBox "学生:" & xm & "," & Right(xh, 3) & "," & zy & "专业于" & Format(Now, "Long Date") & "签到", vbInformation, "签到结果"
End Sub
第2个回答 2014-09-26
Private Sub Command1_Click()
Dim strName As String, strStuNum As String, strMajor As String
'姓名
strName = InputBox("输入姓名", "", "")
'学号
strStuNum = InputBox("输入学号", "", "2013054001")
'专业
strMajor = InputBox("输入专业", "", "")
'弹出框
MsgBox "学生:" & strName & "+" & Right(strStuNum, 3) & "+" & strMajor & "于 " & Year(Date) & "年" & Month(Date) & "月" & Day(Date) & "日签到", vbInformation, "签到结果"
End Sub
Private Sub Form_Load()
Command1.Caption = "签到"
End Sub