Beep when Messagebox is displayed

D

Diane Alsing

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
 
J

Jake Marx

Hi Diane,

Diane said:
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]
 
D

Diane Alsing

Even better - thank you!

Jake Marx said:
Hi Diane,

Diane said:
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]
 

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