property MsgBox.AutoClose as Long
Specifies the time in seconds to automatically close the message box.

TypeDescription
Long A long expression that specifies the time in seconds to automatically close the message box.
By default, the AutoClose property is 0. If the AutoClose property is 0, the user must close the message box using the ui buttons, else the message box is automatically closed after specified time is elapsed. Use the AutoClose property to automatically let the message box being visible for a specified time.  The Out method returns exCloseTimer value if the message box has been automatically closed after elapsing the specified time. The <%sec%> HTML tag indicates in the Prompt parameter of the Out method indicates the number of the seconds until the message box is closed. The <%sec%> is valid only if the AutoClose property is not 0. Use the <%sec%> HTML tag to indicate a prompt for number of seconds until the message box will be automatically closed.

The following VB sample displays a message box, and automatically closes it after 5 seconds:

With MsgBox1
    .AutoClose = 5
    .Out "This is a short message we want to display for few seconds<br><r>Closing in <b><%sec%></b> seconds.<br><br>", vbInformation, "AutoClose"
End With

The message box displays the message "Closing in <%sec%> seconds" that indicates the number of seconds until the message box will be automatically closed.