Results 1 to 2 of 2

Thread: Change the default button In MsgBox

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2000
    Posts
    24

    Question

    I wonder How can I Change the default button In MsgBox ?, for example , I want to change it for YES to NO (for a MsgBox that use vbYesNo).

  2. #2
    Guest
    The DefaultButton2 will change the Default Button to the 2nd button on the MessageBox, which in this case, is NO.

    Code:
    ' Change the DefaultButton to NO.
    RetVal = MsgBox("Message Box", vbYesNo + vbExclamation + vbDefaultButton2, "Message Box")

Posting Permissions

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



Click Here to Expand Forum to Full Width