Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 112
Default Default Response to a MsgBox

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????
  #2   Report Post  
Posted to microsoft.public.excel.programming
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????



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,489
Default Default Response to a MsgBox

Hi Fred,

You can combine the Button parameters.

MsgBox "test", vbYesNoCancel Or vbDefaultButton2

Cheers
Andy

Fred Holmes wrote:

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????


--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
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 do I transform a word response to a numeric response? kanegaro Excel Discussion (Misc queries) 0 January 11th 08 05:08 PM
How do I set up a daily call out response response register? Pule Excel Worksheet Functions 1 October 7th 07 01:34 PM
value response Kaputa Excel Discussion (Misc queries) 2 January 6th 06 12:23 AM
can I get some help here? No response yet :) T Excel Worksheet Functions 5 December 22nd 04 07:56 PM
Response Ronbo Excel Programming 1 February 22nd 04 11:10 PM


All times are GMT +1. The time now is 05:41 PM.

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

About Us

"It's about Microsoft Excel"