I would like to get a MsgBox pop up to alert the user to a condition
without pausing or stopping the execution of the program. The MsgBox
would have the information and a button to close.
Play with these.
Sub CheckMessage()
Debug.Print Now
BriefMessage "This is the Message", 2, "This is the Title"
Debug.Print Now
BriefMessage "This is the Message", 4
Debug.Print Now
End Sub
Sub BriefMessage(strMessage, intSeconds, _
Optional strTitle As String)
If Len(Nz(strTitle, "")) = 0 Then
strTitle = "Closes in " & CStr(intSeconds) & " Seconds"
End If
Dim wsh As Object
Set wsh = CreateObject("WScript.Shell")
wsh.PopUp strMessage, intSeconds, strTitle
Set wsh = Nothing
End Sub
Cheers,
Alan Forsyth