在Visual Studio 2010中的 Visual Basic中,如果用于提供消息,
MsgBox("hello", 4, "status")
Run Code Online (Sandbox Code Playgroud)
如何操作msgbox中的结果是或否?
如果用户给出No,就会发生这种情况,如果没有,则会发生这种情况.
你需要检查是否MsgBox返回vbYes.
例如:
If vbYes = MsgBox("hello", vbYesNo, "status") Then
'Do things
Else
'Don't do things
End If
Run Code Online (Sandbox Code Playgroud)