+ Reply to Thread
Results 1 to 6 of 6

get rid of mesage boxes

  1. #1
    Registered User
    Join Date
    05-12-2005
    Posts
    68

    Question get rid of mesage boxes

    how do you make a certain MsgBox always say yes or no.
    example when it asks to save it always says yes automaticly.

  2. #2
    Jeff
    Guest

    RE: get rid of mesage boxes

    Tim,

    See VBA Help on Msgbox. All you need is there & then some...

    Example:

    Mgsbox "Today is Friday ?", VbYesNo + vbDefaultButton2
    will default to No

    Mgsbox "Today is Friday ?", VbYesNo + vbDefaultButton1
    Will Default to Yes

    Jeff


    "tim64" wrote:

    >
    > how do you make a certain MsgBox always say yes or no.
    > example when it asks to save it always says yes automaticly.
    >
    >
    > --
    > tim64
    > ------------------------------------------------------------------------
    > tim64's Profile: http://www.excelforum.com/member.php...o&userid=23295
    > View this thread: http://www.excelforum.com/showthread...hreadid=376894
    >
    >


  3. #3
    Jon C
    Guest

    Re: get rid of mesage boxes

    Try using something like:

    resp = MsgBox("Yes or No?", vbYesNo + vbDefaultButton2)

    The vbYesNo gives you a 'Yes' and a 'No' button, vbDefaultButton2
    defaults the 'No' button. If you omit the vbDefaultButton, 'Yes' is
    defaulted.

    HTH,

    Jon C


  4. #4
    Tom Ogilvy
    Guest

    Re: get rid of mesage boxes

    What's the point of asking?

    Perhaps this is what you want:

    MsgBox "Going to save now", vbOKOnly

    Or did you mean set the default button - see the vba help on msgbox - this
    is pretty explanatory.

    --
    Regards,
    Tom Ogilvy


    "tim64" <[email protected]> wrote in
    message news:[email protected]...
    >
    > how do you make a certain MsgBox always say yes or no.
    > example when it asks to save it always says yes automaticly.
    >
    >
    > --
    > tim64
    > ------------------------------------------------------------------------
    > tim64's Profile:

    http://www.excelforum.com/member.php...o&userid=23295
    > View this thread: http://www.excelforum.com/showthread...hreadid=376894
    >




  5. #5
    Amedee Van Gasse
    Guest

    Re: get rid of mesage boxes

    tim64 shared this with us in microsoft.public.excel.programming:

    >
    > how do you make a certain MsgBox always say yes or no.
    > example when it asks to save it always says yes automaticly.


    Beware: tim64 is clueless about newsgroups. He uses a web forum that
    propagates to usenet
    (http://www.excelforum.com/search.php?searchid=131065). IMHO, these web
    forum users don't get enough information on how the newsgroups work.
    They are a nuisance and it's not even their own fault. And I'm not
    talking about the MS web forum, but about all those little third-party
    freeloader websites. :-(

    --
    Amedee Van Gasse using XanaNews 1.17.4.1

  6. #6
    Forum Contributor
    Join Date
    06-10-2004
    Location
    India
    Posts
    1,066
    Or you are probably looking at something like

    Application.DisplayAlerts = False
    ' your code here
    Application.DisplayAlerts = True

    So you won't get any message box asking for save - yes no


    Mangesh


    how do you make a certain MsgBox always say yes or no.
    example when it asks to save it always says yes automaticly.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1