Click to See Complete Forum and Search --> : Change The Message Box Default Icon
gshabtay
Jul 11th, 2000, 03:26 AM
I just wonder how can I Change The Message Box
Default Icon ?
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.
vbApplicationModal 0 Application modal message box (default).
vbSystemModal 4096 System modal message box.
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.
use:
Msgbox "Hi!", 64, "Hello!!!"
Msgbox "What?", 32
Msgbox "System Message!, 48
Msgbox "DANGER!", 16
You can add to:
Msgbox "Hi", 4 + 1
Or look in your help file under Msgbox Constants. Those are the icons and options you can do with a messagebox. There is no way you can use the default messagebox and use your own icon, to do that, you must create your own with a form.
[Edited by Matthew Gates on 07-11-2000 at 02:50 PM]
It might be easier just to use the constants.
retval = MsgBox("Critical Icon with ABORT, RETRY, IGNORE", vbAbortRetryIgnore + vbCritical, "MyTile")
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.