View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
KL[_5_] KL[_5_] is offline
external usenet poster
 
Posts: 49
Default Default Response to a MsgBox

Try this:

MsgBox "Are you sure?", vbDefaultButton1 + vbOKCancel, "Default Option"
MsgBox "Are you sure?", vbDefaultButton2 + vbOKCancel, "Default Option"

or this:

MsgBox "Are you sure?", vbDefaultButton1 + vbYesNoCancel, "Default Option"
MsgBox "Are you sure?", vbDefaultButton2 + vbYesNoCancel, "Default Option"
MsgBox "Are you sure?", vbDefaultButton3 + vbYesNoCancel, "Default Option"

Cheers,
KL


"Fred Holmes" wrote in message
...
Excel 2003

I have a message box with Buttons:=vbYesNoCancel

The default response (button with focus -- executed by <Enter) is
"Yes". How do I change it so that the default response is "No"?


There is no option for Buttons:=vbNoYesCancel

There doesn't seem to be any explicit parameter that provides for the
developer to select the default response????