Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
JT JT is offline
external usenet poster
 
Posts: 234
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default 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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to change the default of 30 days change history Andy Smith[_2_] Excel Discussion (Misc queries) 6 October 23rd 07 11:57 PM
CmdButton - How to make button it the default button? Craigm[_43_] Excel Programming 2 February 24th 06 06:05 PM
Option Button as default StephanieH Excel Programming 2 May 17th 05 02:14 PM
messagebox without default button Peter Janssens Excel Programming 1 November 21st 04 03:55 PM
messagebox without default button Peter Janssens Excel Programming 0 November 21st 04 02:18 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"