点击按钮弹出一个对话框的VB代码

2024-11-22 13:01:17
推荐回答(5个)
回答1:

msgbox"逗你玩",vbokcancel,"标题"

其中vbokcancel在对话框处出现“确定”和“取消”

可以设置多行代码
如:
msgbox"逗你玩",vbokcancel,"标题"
msgbox"逗你玩",vbokcancel,"标题"
msgbox"逗你玩",vbokcancel,"标题"
msgbox"逗你玩",vbokcancel,"标题"
msgbox"逗你玩",vbokcancel,"标题"
msgbox"逗你玩",vbokcancel,"标题"

回答2:

在窗体上添加一个按钮,单击按钮在弹出的代码框中写代码
Private Sub Command1_Click()
Do Until a = vbCancel
a = MsgBox("逗你玩!")
Loop
End Sub

回答3:

Private Sub Command1_Click()
MsgBox "哈哈,逗你玩呢", vbOKCancel, "中计了"

End Sub

回答4:

msgbox"你所要说的话"

回答5:

msgbox "逗你玩",vbyesno,"哈哈"