ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Qn: Sound in MsgBox?? (https://www.excelbanter.com/excel-programming/307337-qn-sound-msgbox.html)

Michael Vaughan

Qn: Sound in MsgBox??
 
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



Tom Ogilvy

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

msgbox "Your urgent message", vbCritical

--
Regards,
Tom Ogilvy

"Michael Vaughan" wrote in message
...
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





...Patrick[_3_]

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



"Michael Vaughan" a écrit dans le message de
...
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






All times are GMT +1. The time now is 04:03 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com