PDA

View Full Version : Un-wanted audio alert



mikerickson
05-22-2008, 09:52 PM
I am writting a UDF. It works good, but it has a "feature" that I would like to change. This is the start of the function.

Function ArrayOfPrecedents(homeCell As Range) As Variant
Dim outRRay As Variant
Dim i As Long, pointer As Long
If homeCell.HasFormula Then
ReDim outRRay(1 To Len(homeCell.Formula))
On Error Resume Next
homeCell.Parent.ClearArrows

homeCell.ShowPrecedents: Rem problem Line

On Error GoTo 0

Rem more code
End Function
If homeCell contains a formula that has precedents (eg. =A1+B1) everything is fine.
If homeCell contains a constant, everything is fine.
If homeCell contains a formula that has no precedents (eg. =TODAY() ) Excel beeps when that line is executed. In addition to annoying me, it also slows execution tremendously.

In other sitations, Excel will sometimes beep at me if I give it bad directions. This is the same audio alert.

Both of these have failed to silence the beep.Application.DisplayAlerts = False
Application.EnableSound = False

Does anyone know how to silence Excel's alert beep?

Thank you.

Oorang
06-09-2008, 12:31 PM
I'm surprised that enablesound = false didn't fix it. The only thing past that I could think of would be something like what we did here (http://www.vbaexpress.com/forum/showthread.php?t=19060).

mikerickson
06-10-2008, 06:27 AM
Yes, it look that the approach would be useful on a Windows machine. Unfortunatly, I'm on Mac.

Thanks for the link. Sound is a an underdeveloped part of Excel. (Considering some of the garish uses of color, underdeveloped sound may be a good thing.)

Oorang
06-10-2008, 01:07 PM
Sorry I know zippo about macs, hopefully someone else will have something to contribute?