ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Associating a sound to a MsgBox ? (https://www.excelbanter.com/excel-programming/337755-associating-sound-msgbox.html)

Junkyard Engineer

Associating a sound to a MsgBox ?
 
I have this msgbox asking yes/no question. How can I associate a sound with
it ?


Answer = MsgBox("Do you want to continue ?", vbYesNo + 256 + vbQuestion,
"ATTENTION")
If Answer = vbNo Then Exit Sub





Jake Marx[_3_]

Associating a sound to a MsgBox ?
 
Hi Junkyard,

Junkyard Engineer wrote:
I have this msgbox asking yes/no question. How can I associate a
sound with it ?


Answer = MsgBox("Do you want to continue ?", vbYesNo + 256 +
vbQuestion, "ATTENTION")
If Answer = vbNo Then Exit Sub


You could use vbExclamation instead of vbQuestion - that will give the user
a beep. MS uses it in the "Save changes?" dialog in Excel.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


Vasant Nanavati

Associating a sound to a MsgBox ?
 
Or simply insert the Beep command before invoking the MsgBox.

--

Vasant


"Jake Marx" wrote in message
...
Hi Junkyard,

Junkyard Engineer wrote:
I have this msgbox asking yes/no question. How can I associate a
sound with it ?


Answer = MsgBox("Do you want to continue ?", vbYesNo + 256 +
vbQuestion, "ATTENTION")
If Answer = vbNo Then Exit Sub


You could use vbExclamation instead of vbQuestion - that will give the
user a beep. MS uses it in the "Save changes?" dialog in Excel.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]




Junkyard Engineer

Associating a sound to a MsgBox ?
 
simplest things are the best !

Thanks

"Jake Marx" a écrit dans le message de news:
...
Hi Junkyard,

Junkyard Engineer wrote:
I have this msgbox asking yes/no question. How can I associate a
sound with it ?


Answer = MsgBox("Do you want to continue ?", vbYesNo + 256 +
vbQuestion, "ATTENTION")
If Answer = vbNo Then Exit Sub


You could use vbExclamation instead of vbQuestion - that will give the
user a beep. MS uses it in the "Save changes?" dialog in Excel.

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]




Jake Marx[_3_]

Associating a sound to a MsgBox ?
 
Vasant Nanavati wrote:
Or simply insert the Beep command before invoking the MsgBox.


Yeah, but that would be too simple, Vasant. <g

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]


All times are GMT +1. The time now is 02:50 AM.

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