Option Explicit
Private Sub Form_Click()
Dim x As Integer
x = MsgBox("你单击的是窗体,是吗?", 35, "询问框")
If x = 6 Then '若们四个box的函数的返回值是6
MsgBox "你选择了“是”按钮", vbInformation, "信息框"
'弹出的选择“是”的消息框 注意是的引号是中文的 这是犯错误的地方
ElseIf x = 7 Then '同上
MsgBox "你选择了“否”按钮", vbInformation, "信息框"
ElseIf x = 6 Then '同上
MsgBox "你选择了“取消”按钮", vbInformation, "消息框"
End If
End Sub