Can I get a popup MsgBox without stopping/pausing VBA program?

G

Gum

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.
 
K

kirkm

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.

I'm pretty sure a MsgBox is modal.

What I'd do is design a Form to emulate a message box. That should do
the job nicely.

Cheers - Kirk
 
S

Stringer

Gum;218173 said:
I would like to get a MsgBox pop up to alert the user to a conditio
without
pausing or stopping the execution of the program. The MsgBox woul
have the
information and a button to close.

I Doubt it, is the condition the progress of the running macro
 
D

Dave Peterson

I take the easy route and use:

Application.statusbar = "some important notice here"
....

And at the end of the code:

application.statusbar = false

To give it back to excel.
 
A

Alan Forsyth

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top