Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CLOSE MESSAGE BOX PROGRAMMATICALLY

1 view
Skip to first unread message

donstock

unread,
Mar 20, 2004, 7:35:08 PM3/20/04
to
Can a message box be closed programmatically? without any interaction with
the keyboard or mouse? I'm trying to display a message box for a given
amount of time then have it automatically close.
--


--
D.S.


Dave Peterson

unread,
Mar 20, 2004, 9:00:27 PM3/20/04
to
Jim Rech posted this solution:

Sub SelfClosingMsgBox()
CreateObject("WScript.Shell").Popup "Hello", 2, _
"This closes itself in 2 seconds"
End Sub

--

Dave Peterson
ec3...@msn.com

Rockee052 <>

unread,
Mar 20, 2004, 8:57:21 PM3/20/04
to
Found this in google, hope it helps

If you have the Windows Scripting Host Obj model installed (WSHOM.OCX),
and
I believe it's part of Windows 98 among other things, you can run
this:

Sub SelfClosingMsgBox()
CreateObject("WScript.Shell").Popup "Hello", 2, "This closes itself


in 2 seconds"
End Sub

By, Jim Rech


Rockee


---
Message posted from http://www.ExcelForum.com/

donstock

unread,
Mar 21, 2004, 12:29:23 AM3/21/04
to
Thanks, that works very well. I've also created a userform to look like a
message box, and use the OnTime method to unload the form after a given
interval.

D.S.

"Dave Peterson" <ec3...@msn.com> wrote in message
news:405CF73B...@msn.com...

Ivan F Moala

unread,
Mar 21, 2004, 3:59:03 AM3/21/04
to
Have a look here with what you can do with Scripting & API's

http://www.xcelfiles.com/Excel03.html


Rockee052 <<Rockee05...@excelforum-nospam.com>> wrote in message news:<Rockee05...@excelforum-nospam.com>...

Tom Ogilvy

unread,
Mar 21, 2004, 11:55:55 AM3/21/04
to
Ivan,
the link seems to be missing to download the workbook with the scripting
example. Just a heads up.

--
Regards,
Tom Ogilvy

"Ivan F Moala" <ivan...@xtra.co.nz> wrote in message
news:9e500a31.04032...@posting.google.com...

Ivan F Moala

unread,
Mar 22, 2004, 2:18:32 AM3/22/04
to
Oh Jezz !! sorry ...... thanks Tom :-)
Appreciate the heads up.

Linked up now.

"Tom Ogilvy" <twog...@msn.com> wrote in message news:<105ri76...@news.supernews.com>...

donstock

unread,
Mar 22, 2004, 7:58:22 PM3/22/04
to
Thanks Ivan & Tom,
I'll have to study on this a while.

D.S.

0 new messages