LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #14   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Close msgbox automatically

Doesn't work for me in my 2003 setup.

The msgbox appears on the screen and also as a new entry(Test) on my
Taskbar??

But never closes on its own.


Gord Dibben MS Excel MVP

On Tue, 30 Dec 2008 17:25:01 -0800, JLGWhiz
wrote:

Works for me too, Mike. Must be something in the OP settings that prevents
it from executing.

"Mike H" wrote:

Hi,

In XL2003, I can run the solution posted by me and the one by Leith without
setting this reference.

Mike

"Orion Cochrane" wrote:

Set a reference to Windows Script Host Object Model (Tools References).
Copy and paste the TimedMsgBox code and try it. It works for me.
--
I am running on Office 2003, unless otherwise stated.


"EXCELMACROS" wrote:

Sorry Leith, it did not work. I have to click "OK" for it to close...
--
Thank you...


"Leith Ross" wrote:


Hello EXCELMACROS,

Here is macro to close the dialog after 5 seconds. You can change this
to suite your needs.

Code:
--------------------

Sub TimedMsgBox()

Dim Msg As String
Dim Secs As Long
Dim Wsh As Object

Title = "Test"
Msg = "This will close in 5 seconds."
Secs = 5

Set Wsh = CreateObject("WScript.Shell")
RetVal = Wsh.Popup(Msg, Secs, Title, vbInformation + vbOKOnly)
Set Wsh = Nothing

End Sub

--------------------

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.thecodecage.com/forumz/member.php?userid=75
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=45231



 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Msgbox Close with vba art Excel Programming 10 November 20th 08 01:23 PM
close msgbox Dan Excel Programming 4 July 30th 07 07:40 PM
Msgbox Close Button jnf40 Excel Programming 1 September 20th 06 05:45 PM
Close msgbox ? Buddy Lee Excel Programming 3 November 22nd 05 04:14 PM
Close a MsgBox Taffy[_2_] Excel Programming 6 October 4th 04 09:39 PM


All times are GMT +1. The time now is 09:59 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"