Excel MsgBox'es from Mr Excel



 FAQFAQ
   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   FavoritesFavorites   StatisticsStatistics 
 RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
Online StoreOnline Store

MrExcel Message Board Forum Index -> Excel Questions

MsgBox'es
Post new topic   Reply to topic
Last Thread | Next Thread  >   Printable version
  Author    Thread

MDTyKe
Board Regular


Joined: 19 Feb 2004
Posts: 46

Flag: Cyprus

Status: Offline

 Reply with quote  

MsgBox'es

Alright, Ive been using message boxes throughout my spreadsheet, such as:

MsgBox "Please now fill in the details. Only those colored in white are necessary. Press 'Confirm Order' to complete the order", vbOKOnly, "Information"

However, you know the way there is the proper information boxes, with the question mark etc in it, like you have in data validation. Is there any thing especially for it, maybe an alternative for "vbOKOnly" or something?

Matt

Post Fri Mar 19, 2004 9:01 pm 
 View user's profile Send private message

DRJ
Board Master
Board  Master


Joined: 18 Feb 2002
Posts: 1930
Location: California
Flag: Usa

Status: Offline

 Reply with quote  

do you mean like this?

MsgBox "Hi", vbQuestion
_________________







-Jacob

Post Fri Mar 19, 2004 9:03 pm 
 View user's profile Send private message Send e-mail

Cbrine
Board Master


Joined: 02 Dec 2003
Posts: 647

Flag: Canada

Status: Offline

 Reply with quote  

Re: MsgBox'es

MsgBox "Test", vbInformation

The second parameter determine's what type of message box to show. You have a ton of different options to choose from. Hope this helps.
_________________
Heisenberg may have slept here.

Post Fri Mar 19, 2004 9:04 pm 
 View user's profile Send private message

firefytr
Board Master
Board  Master


Joined: 09 Dec 2003
Posts: 1322
Location: Boardman, OR
Flag: Usa

Status: Offline

 Reply with quote  

Re: MsgBox'es

here ya go,

'these are some
MsgBox ("asdf"), vbCritical
MsgBox ("zxcv"), vbOKCancel
MsgBox ("qwerty"), vbOKOnly
MsgBox ("poiu"), vbQuestion
MsgBox ("mnbv"), vbYesNo
MsgBox ("something here.."), vbYesNoCancel
'and there are others


there are others too. check out the help files.

from microsoft help files...


quote:
The following constants can be used anywhere in your code in place of the actual values:

MsgBox Arguments
Constant Value Description
vbOKOnly 0 OK button only (default)
vbOKCancel 1 OK and Cancel buttons
vbAbortRetryIgnore 2 Abort, Retry, and Ignore buttons
vbYesNoCancel 3 Yes, No, and Cancel buttons
vbYesNo 4 Yes and No buttons
vbRetryCancel 5 Retry and Cancel buttons
vbCritical 16 Critical message
vbQuestion 32 Warning query
vbExclamation 48 Warning message
vbInformation 64 Information message
vbDefaultButton1 0 First button is default (default)
vbDefaultButton2 256 Second button is default
vbDefaultButton3 512 Third button is default
vbDefaultButton4 768 Fourth button is default
vbApplicationModal 0 Application modal message box (default)
vbSystemModal 4096 System modal message box
vbMsgBoxHelpButton 16384 Adds Help button to the message box
VbMsgBoxSetForeground 65536 Specifies the message box window as the foreground window
vbMsgBoxRight 524288 Text is right aligned
vbMsgBoxRtlReading 1048576 Specifies text should appear as right-to-left reading on Hebrew and Arabic systems



MsgBox Return Values
Constant Value Description
vbOK 1 OK button pressed
vbCancel 2 Cancel button pressed
vbAbort 3 Abort button pressed
vbRetry 4 Retry button pressed
vbIgnore 5 Ignore button pressed
vbYes 6 Yes button pressed
vbNo 7 No button pressed


_________________
Regards,
Zack

Post Fri Mar 19, 2004 9:16 pm 
 View user's profile Send private message

headtoadie
Board Regular


Joined: 01 Aug 2003
Posts: 58

Flag: Blank

Status: Offline

 Reply with quote  

Re: MsgBox'es

Is it possible to do custom text on the response buttons of a msgbox?

HT

Post Tue Mar 30, 2004 1:05 pm 
 View user's profile Send private message

DRJ
Board Master
Board  Master


Joined: 18 Feb 2002
Posts: 1930
Location: California
Flag: Usa

Status: Offline

 Reply with quote  

If you want to customize the message box you need to just make your own userform. Then you can customize a lot of things the way you want.
_________________







-Jacob

Post Tue Mar 30, 2004 1:44 pm 
 View user's profile Send private message Send e-mail

Tom Urtis
MrExcel MVP


Joined: 11 Feb 2002
Posts: 2626
Location: San Francisco / Silicon Valley, California USA
Flag: Blank

Status: Offline

 Reply with quote  

Re: MsgBox'es

quote:
Originally posted by headtoadie:
Is it possible to do custom text on the response buttons of a msgbox?

Yes it is possible but probably not worth the effort and API overhead. See the following link, and links within that link, for ways to do what you are asking about:

http://216.92.17.166/board2/viewtopic.php?t=73241&highlight=caption
_________________
Tom Urtis

Post Tue Mar 30, 2004 3:59 pm 
 View user's profile Send private message Send e-mail Visit poster's website
  Display posts from previous:      

MrExcel Message Board Forum Index -> Excel Questions


Forum Jump:
Jump to:  

Post new topic   Reply to topic
Page 1 of 1



Add To Favorites

 


Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Powered by phpBB: 2.0.4 © 2001 phpBB Group

Need help posting your first question? Read how to post

Need extra help ? Couldn't get the answer you needed ? Get a free quote from our Consulting Team

Download Colo's HTML Maker utility for displaying your Excel Worksheet on the board.

Download VB HTML Maker to post your code on the board


Check out our new index to 485 Excel Articles.


Return to MrExcel Consulting

All contents Copyright 1998-2004 by MrExcel.com
If you believe information posted here is from your copyrighted source, notify us per the Terms of Use
Excel is a registered trademark of the Microsoft Corporation.
MrExcel is a registered trademark of Tickling Keys, Inc.