+ Reply to Thread
Results 1 to 4 of 4

Message box

  1. #1
    Pat
    Guest

    Message box

    The following messagebox contains two buttons. To have a message contained
    in the messagebox also but not on the actual buttons what alteration should
    I make?

    ans = MsgBox("OK", vbOKCancel)
    If ans = vbCancel Then Exit Sub

    Pat



  2. #2
    Jan Karel Pieterse
    Guest

    Re: Message box

    Hi Pat,

    > The following messagebox contains two buttons. To have a message contained
    > in the messagebox also but not on the actual buttons what alteration should
    > I make?
    >
    > ans = MsgBox("OK", vbOKCancel)
    > If ans = vbCancel Then Exit Sub
    >


    Not sure if I understand what your problem is, but the "OK" part of the code
    above can be changed, e.g. to this:

    ans = MsgBox("Hit OK" & vbNewLine & "Or hit Cancel!",vbOKCancel)

    Regards,

    Jan Karel Pieterse
    Excel MVP
    www.jkp-ads.com


  3. #3
    AA2e72E
    Guest

    RE: Message box

    You do not have the option of not showing any buttons: by default, the OK
    button is shown.

    "Pat" wrote:

    > The following messagebox contains two buttons. To have a message contained
    > in the messagebox also but not on the actual buttons what alteration should
    > I make?
    >
    > ans = MsgBox("OK", vbOKCancel)
    > If ans = vbCancel Then Exit Sub
    >
    > Pat
    >
    >
    >


  4. #4
    Pat
    Guest

    Re: Message box

    The message I posted was not correct I have since realised the information
    was what I wanted.

    Thank you both for your help.
    Pat
    "AA2e72E" <[email protected]> wrote in message
    news:[email protected]...
    > You do not have the option of not showing any buttons: by default, the OK
    > button is shown.
    >
    > "Pat" wrote:
    >
    >> The following messagebox contains two buttons. To have a message
    >> contained
    >> in the messagebox also but not on the actual buttons what alteration
    >> should
    >> I make?
    >>
    >> ans = MsgBox("OK", vbOKCancel)
    >> If ans = vbCancel Then Exit Sub
    >>
    >> Pat
    >>
    >>
    >>




+ 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