2013-03-13 175 views
0

我有幾秒鐘的一定量後自動關閉MsgBox的腳本:VBA MSGBOX關閉在不到一秒鐘

Sub Test1() 
Dim AckTime As Integer, InfoBox As Object 
Set InfoBox = CreateObject("WScript.Shell") 
AckTime = 3 
Select Case InfoBox.Popup("Click OK or do nothing within 3 seconds.", _ 
AckTime, "This is your Message Box", 0) 
Case 1, -1 
Exit Sub 
End Select 
End Sub 

問題是,我想框關閉少比一秒鐘,也許半秒鐘,但改變它爲.5,例如,什麼都不做。事實上,我不認爲它完全關閉。

+0

已閱讀http://www.ozgrid.com/forum/showthread.php?t=24610 – 2013-03-13 17:29:33

回答

2

對不起,但Windows腳本主機方法彈出只需要整數作爲延遲參數,source