The code below will allow you to create a message box that will close after the specified time.

Just cut and paste the code below and run the program.

================= Add code to module ======================
Public Const NV_CLOSEMSGBOX As Long = &H5000&
Public Declare Function SetTimer& Lib "user32" (ByVal hWnd&, _
ByVal nIDEvent&, ByVal uElapse&, ByVal lpTimerFunc&)
Public Declare Function FindWindow& Lib "user32" Alias _
"FindWindowA" (ByVal lpClassName$, ByVal lpWindowName$)
Public Declare Function LockWindowUpdate& Lib "user32" (ByVal hwndLock&)
Public Declare Function SetForegroundWindow& Lib "user32" (ByVal hWnd&)
Public Declare Function MessageBox& Lib "user32" Alias "MessageBoxA" _
(ByVal hWnd&, ByVal lpText$, ByVal lpCaption$, ByVal wType&)
Public Declare Function KillTimer& Lib "user32" (ByVal hWnd&, _
ByVal nIDEvent&)

Public Const API_FALSE As Long = 0&
Public Const MB_ICONASTERISK = &H40&
Public Const MB_ICONEXCLAMATION = &H30&
Public Const MB_ICONHAND = &H10&
Public Const MB_ICONINFORMATION = MB_ICONASTERISK
Public Const MB_ICONQUESTION = &H20&


Public Sub TimerProc(ByVal hWnd&, ByVal uMsg&, ByVal idEvent&, ByVal dwTime&)
KillTimer hWnd, idEvent
Dim hMessageBox&
'Replace 'Self Closing Message Box' with the title you gave to your message box.
hMessageBox = FindWindow("#32770", "Self Closing Message Box")
If hMessageBox Then
Call SetForegroundWindow(hMessageBox)
SendKeys "{enter}"
End If
Call LockWindowUpdate(API_FALSE)
End Sub

==================== Add code to Form =========================

Private Sub Form_Load()
'Replace the '4000' below with the number of milliseconds the message box
'will appear. 1000 milliseconds = 1 second
'You can also replace the message box icon from the Information icon to
'any of the const located in the module

SetTimer hWnd, NV_CLOSEMSGBOX, 2000&, AddressOf TimerProc
Call MessageBox(hWnd, "Watch this message box close itself after four seconds", _
"Self Closing Message Box", MB_ICONINFORMATION)
End Sub