Qn: Sound in MsgBox??

M

Michael Vaughan

Hello Everyone,

I have constructed some MsgBox errors in my UserForm1. If it is out of a
parameter, or exceeds a number, the MsgBox comes up explaining the error.
The MsgBox function works fine, BUT.. how to I input the code so that it
executes a "Ding" or .wav sound to alert the person that the MsgBox just
appeared. You see it in all the programs, you make a mistake, a "Ding"
chimes and the MsgBox is displayed. In my program, it just shows the MsgBox
with NO sound. Any idea's???
Thanks in advance.. mv
 
T

Tom Ogilvy

if you don't have the sound muted, then this makes a Ding for me:

msgbox "Your urgent message", vbCritical
 
P

...Patrick

Sub PlayMySounds()
'Robert Parsons, mpep
ActiveSheet.OLEObjects.Add(Filename:="E:\SOUNDS\SPAM 1.wav", _
Link:=False, DisplayAsIcon:=False).Select
Selection.Verb Verb:=xlPrimary
End Sub
 

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