试图寻找答案,一切都太简单了,或者与我需要的不符。我有一个消息框,我让它正确显示信息。我有一个是和否按钮。我想要一个计时器,所以当计时器用完时,它会继续。如果有人点击是,它会继续执行代码,如果他们点击否,那么它会将用户返回到其他地方。这就是我所拥有的,请帮助。
akey = MsgBox ("Image OS = " & ImageType & vbcrlf & _
"ComputerName = " & ComputerName & vbcrlf & _
"TimeZone = " & TZone & vbcrlf & _
"Ghost Server = " & Server & vbcrlf & _
"Broadcast Method = " & BMethod & vbcrlf & _
"Ghost Session = " & GhostSession _
, vbyesno + vbquestion,VN & " Please Confirm")
Run Code Online (Sandbox Code Playgroud)
您可以使用 Popup 而不是 Msgbox ...
Set objShell = CreateObject("WScript.Shell")
X = objShell.Popup("You have 3 Seconds to answer", 3, "Test", vbYesNo)
Select Case X
Case vbYes
Msgbox "You pressed YES"
Case vbNo
Msgbox "You pressed NO"
Case Else
MsgBox "You pressed NOTHING"
End Select
Run Code Online (Sandbox Code Playgroud)
否则,您可以尝试操作 HTA 或 Internet Explorer 窗口来执行类似操作。
| 归档时间: |
|
| 查看次数: |
7977 次 |
| 最近记录: |