尝试寻找答案,但都太简单,或者不符合我的需要。我有一个消息框,并且它可以正确显示信息。我有一个"is"和“否”按钮。我想要一个计时器,这样当计时器用完时,它就会继续。如果有人点击"is",它会继续执行代码,如果他们点击“否”,则会将用户返回到其他地方。这是我的,请帮忙。
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")
最佳答案
您可以使用 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
否则,您可以尝试操作 HTA 或 Internet Explorer 窗口来执行类似的操作。
关于VBSCRIPT MsgBox VbYesNo 倒计时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19717496/