中国经济的竞争环境:vb类型问题?

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/15 05:37:13
nResult定义为integer
nResult = MsgBox(sMsg, nButtons, "My Program")
MsgBox(sMsg, nButtons, "My Program")返回值是integer类型的吗?

下面是代码
Dim sMsg As String
Dim nButtons As Integer
Dim nResult As Integer
sMsg = "Are you sure you want to exit?"
nButtons = vbYesNo + vbQuestion
nResult = MsgBox(sMsg, nButtons, "My Program")
If nResult = vbYes Then
End
End If

严格的说,返回的是一个枚举类型

MsgBox 函数
在对话框中显示消息,等待用户单击按钮,并返回一个 Integer 告诉用户单击哪一个按钮。

MSDN里面的,说了是INTERGER,不是枚举类型

是INTERGER,不是枚举。

返回一个数字类型