msgbox buttons

  • Thread starter klp via AccessMonster.com
  • Start date
K

klp via AccessMonster.com

I have a message box that comes up when there is an error. It asks the
question if I want to override - yes or no. By default the yes button is
highlighted. Is there a way to highlight the no button? If so how do I go
about doing this?

Thanks in advance

Kim P.
 
A

Al Camp

Kim,
Part of the MsgBox argument... in the buttons section, dteremines which button is the
Default
VbDefaultButton1 = First button is default.
VbDefaultButton2 = Second button is default.
VbDefaultButton3 = Third button is default.
VbDefaultButton4 = Fourth button is default.

So...
Response = MsgBox("SomePrompt", vbYesNo + vbDefaultButton2, "Some Title")
would have the NO as default.

See MsgBox function in help...
 
K

klp via AccessMonster.com

Great, thank you so much. It worked perfectly!
Have a great day.

Al said:
Kim,
Part of the MsgBox argument... in the buttons section, dteremines which button is the
Default
VbDefaultButton1 = First button is default.
VbDefaultButton2 = Second button is default.
VbDefaultButton3 = Third button is default.
VbDefaultButton4 = Fourth button is default.

So...
Response = MsgBox("SomePrompt", vbYesNo + vbDefaultButton2, "Some Title")
would have the NO as default.

See MsgBox function in help...
I have a message box that comes up when there is an error. It asks the
question if I want to override - yes or no. By default the yes button is
[quoted text clipped - 4 lines]
 
Top