Auto Close Pop-up MsgBox

E

Elton Law

Dear Expert,

I am using Excel 2000 and want to have a pop-up msgbox closing in 2 or 3
seconds automatically.
I browsed the web and found following ....
But I tested .... It would not go away automatically in 2 seconds.
I have to press "OK" to kick this window out ....

Can you tell me how to fine-tune the VB scripts that make pop-up msgbox
really disappear in 3-second time please ?

Thanks

(Quote)
http://www.mvps.org/dmcritchie/excel/inputbox.htm

PopUp or Warning Box, short duration (#popup)
Jim Rech posted code (2000-09-20) to put a warning box up for two seconds
and then disappear.
Thanks to Dave Peterson for mentioning this in newsgroups
Sub SelfClosingMsgBox()
CreateObject("WScript.Shell").Popup "Hello", _
2, "This closes itself in 2 seconds"
End Sub
(End of Quote)
 
J

Jacob Skaria

CreateObject("WScript.Shell").Popup "Hello", 3, "hello!!"

If this post helps click Yes
 
D

Dave Peterson

I'm not sure I understand the technical differences between:

CreateObject("WScript.Shell").Popup "Hello", 3, "hello!!"
and
CreateObject("WScript.Shell").Popup "Hello", _
2, "This closes itself in 2 seconds"

You may find that some versions of windows just won't close automatically. It's
a common complaint.

ps. Both of them closed for me under WinXP home.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top