-
Un-wanted audio alert
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.
Code:
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.[VBA]Application.DisplayAlerts = False
Application.EnableSound = False[/VBA]
Does anyone know how to silence Excel's alert beep?
Thank you.
-
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.
-
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.)
-
Sorry I know zippo about macs, hopefully someone else will have something to contribute?