ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   MsgBox with timeout (https://www.excelbanter.com/excel-discussion-misc-queries/134016-msgbox-timeout.html)

pgarcia

MsgBox with timeout
 
I have the following code but I am missing the timeout function, help!

MsgBox "The update is now complete.", vbInformation, "NAME"

I just want to have it up for around 5-10 sec.

Thanks

Jim Thomlinson

MsgBox with timeout
 
Give this a whirl... Note Select Tools - References - Windows Script Host
Object Model

'requires reference to "Windows Script Host Object Model"
Public Sub MessageTest()
Dim SH As IWshRuntimeLibrary.WshShell
Dim Res As Long

Set SH = New IWshRuntimeLibrary.WshShell
Res = SH.Popup(Text:="Click Me", secondstowait:=2, _
Title:="Hello, World", Type:=vbOKOnly)

End Sub
--
HTH...

Jim Thomlinson


"pgarcia" wrote:

I have the following code but I am missing the timeout function, help!

MsgBox "The update is now complete.", vbInformation, "NAME"

I just want to have it up for around 5-10 sec.

Thanks



All times are GMT +1. The time now is 07:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com