ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Beep when Messagebox is displayed (https://www.excelbanter.com/excel-programming/322896-beep-when-messagebox-displayed.html)

Diane Alsing

Beep when Messagebox is displayed
 
I have created a button that when pressed, runs some pieces of code. I would
like to play a sound, beep whatever to call attention to a message box when
displayed (because this code takes 10 hours to run!!) I would just like to
make sure people read that message before running the code.

Thank you
Regards,
Diane

Jake Marx[_3_]

Beep when Messagebox is displayed
 
Hi Diane,

Diane Alsing wrote:
I have created a button that when pressed, runs some pieces of code.
I would like to play a sound, beep whatever to call attention to a
message box when displayed (because this code takes 10 hours to
run!!) I would just like to make sure people read that message
before running the code.


You could use vbExclamation for the second argument to the MsgBox function:

MsgBox "This is a test.", vbExclamation, "Test Title"

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

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

Diane Alsing

Beep when Messagebox is displayed
 
Even better - thank you!

"Jake Marx" wrote:

Hi Diane,

Diane Alsing wrote:
I have created a button that when pressed, runs some pieces of code.
I would like to play a sound, beep whatever to call attention to a
message box when displayed (because this code takes 10 hours to
run!!) I would just like to make sure people read that message
before running the code.


You could use vbExclamation for the second argument to the MsgBox function:

MsgBox "This is a test.", vbExclamation, "Test Title"

--
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 01:06 AM.

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