Consulting

Results 1 to 4 of 4

Thread: Un-wanted audio alert

  1. #1
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778

    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.
    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.

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    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.
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  3. #3
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    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.)

  4. #4
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    Sorry I know zippo about macs, hopefully someone else will have something to contribute?
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •