ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   msgbox (https://www.excelbanter.com/excel-programming/344187-msgbox.html)

ceemo[_40_]

msgbox
 

hey all,

is it possible to add some custom pics to msg box's as well as the
exclumation, warning and stop sign's ?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=480364


Bob Phillips[_6_]

msgbox
 
You could easily do that with a custom userform.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"ceemo" wrote in
message ...

hey all,

is it possible to add some custom pics to msg box's as well as the
exclumation, warning and stop sign's ?


--
ceemo
------------------------------------------------------------------------
ceemo's Profile:

http://www.excelforum.com/member.php...o&userid=10650
View this thread: http://www.excelforum.com/showthread...hreadid=480364




ceemo[_42_]

msgbox
 

thnx for reply.


if there's no way of adding custom msgbox's then that will be the wa
i'll go. It's nice to not have to create loads of forms just fo
prompts et

--
ceem
-----------------------------------------------------------------------
ceemo's Profile: http://www.excelforum.com/member.php...fo&userid=1065
View this thread: http://www.excelforum.com/showthread.php?threadid=48036


Leith Ross[_151_]

msgbox
 

Hello Ceemo,

To add the Exclamation, Stop sign, Question mark, or Information icons
to your message box, you set the "*Buttons*" parameter using VB
constants. Yoiu can also control the buttons that are displayed (Ok,
Yes, No, Cancel, etc.)

MESSAGE ICON CONSTANTS:
The Exclamation = vbExclamation.
The Stop sign = vbCritical.
The Question mark = vbQuestion
Information (talking head) = vbInformation

BUTTON CONSTANTS:
OK = vbOKOnly
OK and Cancel = vbOKCancel
Yes and No = vbYesNo
Yes and No and Cancel = vbYesNoCancel
Retry and Cancel = vbRetryCancel
Abort and Retry and Ignore = vbAbortRetryIgnore


EXAMPLE 1:
MsgBox "Error!", vbCritical + vbOKOnly

This dispalys the message "Error!" with the Stop Sign icon and the OK
response button. OK is the default button. You can use these same
constants to check which button was selected.


EXAMPLE 2:
X = MsgBox("Click a button", vbInformation + vbOkCancel, "Message Box
Test")
If X = vbOk Then
MsgBox "You chose Ok."
Else
MsgBox "You chose Cancel"
End If

Displays a message box with 2 buttons "Ok" and "Cancel". When you click
one, another message box is displayed showing which button you clicked.


--
Leith Ross


------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=480364



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com