根据函数的返回值判断,看看下面的例子:
If MsgBox("请按键:", vbOKCancel) = vbOK Then
    MsgBox "您按下了确定键。"
Else
    MsgBox "您按下了取消键。"
End If