MsgBox sounds

R

Rich

Hi,

I am using a MsgBox command in a program which is being distributed to a
large number of people across the business. I usually have my sound muted so
did not notice anything...but since sending out have received complaints that
the MsgBox's make loads of noise.

Using simple code in Excel 2003:

MsgBox MsgBoxText, 64, MsgBoxTitle

Can anyone please tell me how I can disable the sounds...and then re-enable
them once the text box has been displayed.

Thanks,

Rich
 
J

JLGWhiz

To disable:

Application.EnableSound = False

To enable:


Application.EnableSound = True
 
R

Rich

Thanks for the prompt response...however, this does not solve the problem.
The tickbox for "feedback with sound" was already un-checked...and even with
these commands in the coding, the MsgBox still makes an annoying sound!
(I guess I should have mentioned this was turned off in my original post)

Any more clues or ideas?
 
P

Peter T

The sounds are defined in system settings (control panel, sounds). It's
possible to programmatically change these but generally regarded as very bad
practice to so (although in this case I sympathise with the objective!).

Regards,
Peter T
 
T

Tim Williams

If there's no other solution you could replace the messagebox with a custom
form.

Tim
 

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