msgbox buttons

  • Thread starter Thread starter klp via AccessMonster.com
  • Start date 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.
 
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...
 
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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top