Sub choose()
Dim str1 As String
Dim str2 As String
str1 = InputBox("请输入职位")
Select Case str1
Case "学生"
MsgBox "同学你好"
Case "工人"
MsgBox "师傅你好"
Case "工程师"
str2 = InputBox("请输入行业")
If str2 = "机械" Then
MsgBox "你是一个机械工程师"
ElseIf str2 = "IT" Then
MsgBox = "你是一个IT工程师"
ElseIf str2 = "建筑" Then
MsgBox "你是一个建筑工程师"
End If
End Select
End Sub