Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hie, can anyone help with the following:
When you create a message box using vbYesNo function, when the box appears on screen, is it possible to change the set-up so that when you press return (carriage return) it will automatically select the "No" option. Standard vbYesNo defaults to "Yes" option when you hit carriage return. Any help would be much appreciated. Thank you -- jj |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Put this macro in a General Module and run it:
Sub MsgBoxButtonTest() MsgBox _ Title:="Default Button Test", _ Prompt:="Is this an aardvark?", _ Buttons:=vbQuestion + vbYesNo + vbDefaultButton2 End Sub Then see Excel VBA Help for MsgBox and study the various Button argument values. Does that help? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "jbjtc" wrote in message ... Hie, can anyone help with the following: When you create a message box using vbYesNo function, when the box appears on screen, is it possible to change the set-up so that when you press return (carriage return) it will automatically select the "No" option. Standard vbYesNo defaults to "Yes" option when you hit carriage return. Any help would be much appreciated. Thank you -- jj |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() MsgBox "Message Text", vbYesNo + vbDefaultButton2, "Titlebar Text" -- Kevin Backmann "jbjtc" wrote: Hie, can anyone help with the following: When you create a message box using vbYesNo function, when the box appears on screen, is it possible to change the set-up so that when you press return (carriage return) it will automatically select the "No" option. Standard vbYesNo defaults to "Yes" option when you hit carriage return. Any help would be much appreciated. Thank you -- jj |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks Kevin
Thats done the trick. -- jj "Kevin B" wrote: MsgBox "Message Text", vbYesNo + vbDefaultButton2, "Titlebar Text" -- Kevin Backmann "jbjtc" wrote: Hie, can anyone help with the following: When you create a message box using vbYesNo function, when the box appears on screen, is it possible to change the set-up so that when you press return (carriage return) it will automatically select the "No" option. Standard vbYesNo defaults to "Yes" option when you hit carriage return. Any help would be much appreciated. Thank you -- jj |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Your code works.
Thanks for your help Ron -- jj "Ron Coderre" wrote: Put this macro in a General Module and run it: Sub MsgBoxButtonTest() MsgBox _ Title:="Default Button Test", _ Prompt:="Is this an aardvark?", _ Buttons:=vbQuestion + vbYesNo + vbDefaultButton2 End Sub Then see Excel VBA Help for MsgBox and study the various Button argument values. Does that help? -------------------------- Regards, Ron (XL2003, Win XP) Microsoft MVP (Excel) "jbjtc" wrote in message ... Hie, can anyone help with the following: When you create a message box using vbYesNo function, when the box appears on screen, is it possible to change the set-up so that when you press return (carriage return) it will automatically select the "No" option. Standard vbYesNo defaults to "Yes" option when you hit carriage return. Any help would be much appreciated. Thank you -- jj |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Carriage Return | Excel Worksheet Functions | |||
Hiding carriage return | Excel Discussion (Misc queries) | |||
Strip carriage return, add row | Excel Worksheet Functions | |||
Carriage Return in Excel | Excel Discussion (Misc queries) | |||
automatic carriage return | Excel Worksheet Functions |