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

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


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



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

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


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

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
Data validation boxes, outputting a final number from the boxes MDH Excel Discussion (Misc queries) 1 November 16th 06 12:41 AM
Moving. Want to number boxes and inventory contents of boxes [email protected] Charts and Charting in Excel 1 August 29th 06 09:48 AM
Selecting subsets using combo boxes or list boxes CLamar Excel Discussion (Misc queries) 0 June 1st 06 07:43 PM
I want a mesage sent when a change is made to an excel file charlieking4747 Excel Discussion (Misc queries) 1 January 13th 06 07:25 PM
No more fonts allowed for this file error mesage Mark Barbier Charts and Charting in Excel 3 January 27th 05 09:45 PM


All times are GMT +1. The time now is 07:38 AM.

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"