ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Change default button (https://www.excelbanter.com/excel-programming/372742-change-default-button.html)

JT

Change default button
 
Is there a way to change the default button from "YES" to "NO" when you
display a msgbox?

I'm afraid the users will click "YES" out of habit, since it is the default
button, when I would prefer that the default button be "NO", so if they click
on the default button (out of habit) they will get another chance to do what
they should be doing in the first place.

Thanks for the help.....
--
JT

Jim Thomlinson

Change default button
 
You can essentially concatenate the styles together with a + sign

MsgBox "Format your drive???", vbCritical + vbYesNo + vbDefaultButton2,
"Format"

--
HTH...

Jim Thomlinson


"JT" wrote:

Is there a way to change the default button from "YES" to "NO" when you
display a msgbox?

I'm afraid the users will click "YES" out of habit, since it is the default
button, when I would prefer that the default button be "NO", so if they click
on the default button (out of habit) they will get another chance to do what
they should be doing in the first place.

Thanks for the help.....
--
JT


Tom Ogilvy

Change default button
 
Just to add for clarity:
the constants have numerical values. You are adding the numbers together.
The function uses the bit values of the result to determine what your
preferences are. The plus sign can actually be used as a concatenation
operator with strings, but in this case it is doing addition since these are
numbers (constants with numerical values).

--
Regards,
Tom Ogilvy

"Jim Thomlinson" wrote in message
...
You can essentially concatenate the styles together with a + sign

MsgBox "Format your drive???", vbCritical + vbYesNo + vbDefaultButton2,
"Format"

--
HTH...

Jim Thomlinson


"JT" wrote:

Is there a way to change the default button from "YES" to "NO" when you
display a msgbox?

I'm afraid the users will click "YES" out of habit, since it is the
default
button, when I would prefer that the default button be "NO", so if they
click
on the default button (out of habit) they will get another chance to do
what
they should be doing in the first place.

Thanks for the help.....
--
JT





All times are GMT +1. The time now is 06:16 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com