hey all,
is it possible to add some custom pics to msg box's as well as the exclumation, warning and stop sign's ?
hey all,
is it possible to add some custom pics to msg box's as well as the exclumation, warning and stop sign's ?
You could easily do that with a custom userform.
--
HTH
RP
(remove nothere from the email address if mailing direct)
"ceemo" <[email protected]> wrote in
message news:[email protected]...
>
> 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
>
thnx for reply.
if there's no way of adding custom msgbox's then that will be the way i'll go. It's nice to not have to create loads of forms just for prompts etc
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.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks