Sub MessageBoxTimer()
    Dim AckTime As Integer, InfoBox As Object
    Set InfoBox = CreateObject("WScript.Shell")
    'Set the message box to close after 10 seconds
    AckTime = 10
    strMsg = InfoBox.Popup("Click OK (this window closes automatically after 10 seconds).", AckTime, "This is your Message Box", 0)
End Sub
Sub SelfClosingMsgBox()
CreateObject("WScript.Shell").Popup "Hello", 2, "This closes itself in 2 seconds "
End Sub
Sub MessageBoxTimer1()
    Dim AckTime As Integer, InfoBox As Object
    Set InfoBox = CreateObject("WScript.Shell")
    'Set the message box to close after 10 seconds
    AckTime = 2
    Select Case InfoBox.Popup("Click OK (this window closes automatically after 10 seconds).", _
    AckTime, "This is your Message Box")
        Case 1, -1
            Exit Sub
    End Select
End Sub