Qn: Sound in MsgBox??

  • Thread starter Thread starter Michael Vaughan
  • Start date Start date
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
 
if you don't have the sound muted, then this makes a Ding for me:

msgbox "Your urgent message", vbCritical
 
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

Back
Top