Results 1 to 10 of 10
  1. #1
    uncletreetrunk is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2012
    Posts
    72

    Supressing Msgbox beep


    Hi all,

    Is there a way to supress the beep from a msgbox using vba? Or a combination of msgbox types?

    Thanks in advanced

  2. #2
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Its the second argument of the MsgBox function. As you type it into VBA, it should pop up the arguments (hit a comma after you type what you want the message to say, and it should give you the options).

    Alternatively, you could create the MsgBox in a Macro, setting the Beep argument to "No", and use the "Convert Macros to Visual Baisc" to see what the code needs to look like.

  3. #3
    uncletreetrunk is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2012
    Posts
    72
    Thanks Joe,

    Do you know which option has no sound? I know vbCritical has a different sound

    When I tried creating a Macro for the beep argument, where do you disable the beep? I couldn't type anything in arguments.

    Thanks for your help

    *Disregard the beep comment, I'm stupid and called the beep method instead of msgbox xD
    Last edited by uncletreetrunk; 08-10-2012 at 02:19 PM. Reason: newbie mistakes are newbie

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Try creating a macro that shuts off the beep on a Message Box, and then convert your Macro to VBA, and then you can see exactly how it needs to be set.

  5. #5
    uncletreetrunk is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2012
    Posts
    72
    It's interesting, when I create a msgbox in the macro creator and disable the beep it works fine. After converting to vba the beep is enabled T.T

    Sorry my access experience is very limited. I barely know enough vba to run the database. I've never used the macro creator before.

  6. #6
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    I checked it out myself, and it appears that you have stumbled onto something very odd - you can suppress the MsgBox beep in a Macro, but not via VBA. I have some discussions on that elsewhere through Google searches.

    I did find a link that has a workaround. See here: http://www.freevbcode.com/ShowCode.asp?ID=1108

  7. #7
    uncletreetrunk is offline Advanced Beginner
    Windows Vista Access 2007
    Join Date
    Jul 2012
    Posts
    72
    hmmm that is interesting... I wonder why that is. The dev's for access continue to intrigue me.

    Oooo cool! Thank you very much! Ummm quick question, how do I apply this to my system?

    LOL sorry never installed something like this before

  8. #8
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    Interesting, I do MsgBox in VBA and don't get beep. Not sure how that is accomplished, don't remember ever getting beep nor doing anything to prevent.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Interesting, I do MsgBox in VBA and don't get beep. Not sure how that is accomplished, don't remember ever getting beep nor doing anything to prevent.
    Its more of a "plonk" than a "beep".
    Forgive me for asking (probably a silly question), but do you have your volume turned off or set to mute?

  10. #10
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,926
    First thing I checked. Volume was on, set low, so I turned it up to max. Still no beep or plonk. That was computer at work. Here I get plonk.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. DoCmd.Beep Volume
    By cbrsix in forum Programming
    Replies: 2
    Last Post: 06-22-2012, 01:30 PM
  2. Yes No msgbox
    By imintrouble in forum Access
    Replies: 3
    Last Post: 10-14-2011, 02:24 PM
  3. Caution MsgBox
    By rovman in forum Access
    Replies: 1
    Last Post: 10-02-2011, 05:40 PM
  4. Supressing .pdf creation in acOutputTo
    By LlamaLima in forum Programming
    Replies: 2
    Last Post: 09-03-2011, 07:34 AM
  5. MsgBox
    By Mtyetti in forum Forms
    Replies: 4
    Last Post: 07-27-2011, 01:51 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums