![]() |
get rid of mesage boxes
how do you make a certain MsgBox always say yes or no. example when it asks to save it always says yes automaticly -- tim6 ----------------------------------------------------------------------- tim64's Profile: http://www.excelforum.com/member.php...fo&userid=2329 View this thread: http://www.excelforum.com/showthread.php?threadid=37689 |
get rid of mesage boxes
Tim,
See VBA Help on Msgbox. All you need is there & then some... Example: Mgsbox "Today is Friday ?", VbYesNo + vbDefaultButton2 will default to No Mgsbox "Today is Friday ?", VbYesNo + vbDefaultButton1 Will Default to Yes Jeff "tim64" wrote: how do you make a certain MsgBox always say yes or no. example when it asks to save it always says yes automaticly. -- tim64 ------------------------------------------------------------------------ tim64's Profile: http://www.excelforum.com/member.php...o&userid=23295 View this thread: http://www.excelforum.com/showthread...hreadid=376894 |
get rid of mesage boxes
What's the point of asking?
Perhaps this is what you want: MsgBox "Going to save now", vbOKOnly Or did you mean set the default button - see the vba help on msgbox - this is pretty explanatory. -- Regards, Tom Ogilvy "tim64" wrote in message ... how do you make a certain MsgBox always say yes or no. example when it asks to save it always says yes automaticly. -- tim64 ------------------------------------------------------------------------ tim64's Profile: http://www.excelforum.com/member.php...o&userid=23295 View this thread: http://www.excelforum.com/showthread...hreadid=376894 |
get rid of mesage boxes
Try using something like:
resp = MsgBox("Yes or No?", vbYesNo + vbDefaultButton2) The vbYesNo gives you a 'Yes' and a 'No' button, vbDefaultButton2 defaults the 'No' button. If you omit the vbDefaultButton, 'Yes' is defaulted. HTH, Jon C |
get rid of mesage boxes
tim64 shared this with us in microsoft.public.excel.programming:
how do you make a certain MsgBox always say yes or no. example when it asks to save it always says yes automaticly. Bewa tim64 is clueless about newsgroups. He uses a web forum that propagates to usenet (http://www.excelforum.com/search.php?searchid=131065). IMHO, these web forum users don't get enough information on how the newsgroups work. They are a nuisance and it's not even their own fault. And I'm not talking about the MS web forum, but about all those little third-party freeloader websites. :-( -- Amedee Van Gasse using XanaNews 1.17.4.1 |
get rid of mesage boxes
Or you are probably looking at something like Application.DisplayAlerts = False ' your code here Application.DisplayAlerts = True So you won't get any message box asking for save - yes no Mangesh how do you make a certain MsgBox always say yes or no. example when it asks to save it always says yes automaticly -- mangesh_yada ----------------------------------------------------------------------- mangesh_yadav's Profile: http://www.excelforum.com/member.php...fo&userid=1047 View this thread: http://www.excelforum.com/showthread.php?threadid=37689 |
All times are GMT +1. The time now is 11:38 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com