2012-04-20 14 views
3

私は、MessageBoxでイベントを警告するためのVBScriptを持っていますが、5秒ほど後に自動的に解除されます。これを達成する方法はありますか?一定の時間が経過すると自動的にMessageBoxを閉じるようにする方法はありますか?

+2

Google:http://blogs.technet.com/b/heyscriptingguy/archive/2005/03/14/how-can-i-automatically-dismissa-a-message-box-after-a-specified-length -of-time.aspx – Fionnuala

+2

VBAまたはVBScriptが必要ですか? –

答えて

9

WshShellオブジェクトのポップアップメソッドを使用します。タイムアウトパラメータがあります。

intTimeout = 10  'Number of seconds to wait 
strMessage = "This is my message box!" 
strTitle = "Hello, world!" 

Set WshShell = CreateObject("WScript.Shell") 
intResult = WshShell.Popup(strMessage, intTimeout, strTitle) 

詳細については、私の記事Mastering the MessageBoxをASP無料でチェックしてください。

関連する問題