msgbox() ...simple question

  • Thread starter Thread starter mark kubicki
  • Start date Start date
M

mark kubicki

is there a way to change the default button on a message box?

I am using vbYesNo, and would prefer that it defaults to No rather than Yes.

thanks in advance,
mark
 
Hi Mark,

In the second parameter of the MsgBox, you can define several properites for
the buttons, which are displayed, and use the "+" operator to combine them,
So for your particular question, try:

MsgBox "Message text", vbYesNo + vbDefaultButton2, "Title text"

or similar.

HTH,

Rob
 
Back
Top