2

试图寻找答案,都太简单了,或者不符合我的需要。我有一个消息框,我让它正确显示信息。我有一个是和否按钮。我想要一个计时器,所以当计时器用完时,它会继续。如果有人点击是,它将继续执行代码,如果他们点击否,则将用户返回到其他地方。这是我的,请帮忙。

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") 
4

1 回答 1

5

您可以使用 Popup 而不是 Msgbox ...

http://ss64.com/vb/popup.html

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 窗口来执行类似的操作。

于 2013-10-31T23:04:14.633 回答