msgbox (2 questions)

Y

Yan Robidoux

first question :

how can i change parameter of message box as :
- change the title of the box...
- change the box layout to have the warning symbol into it (red circl
?)


second question :

how can i put a line break in a message... I want to have multiple lin
but i dont remember how to do it...

thanks in advance for the answers..
 
T

Tom Ogilvy

Sub AAAA()
res = MsgBox( _
prompt:="Make a selection" & _
vbNewLine & "from the buttons", _
Buttons:=vbYesNo + vbCritical, _
Title:="Critical Alert")
End Sub
Sub AAAA()
res = MsgBox( _
prompt:="Make a selection" & _
vbNewLine & "from the buttons", _
Buttons:=vbYesNo + vbCritical, _
Title:="Critical Alert")
End Sub
 
G

GJones

Hi Yan;

The first part is like this:

MsgBox "here is your prompt", vbOKOnly, "Your Title Goes
Here"


The second part I do not have.

Thanks,

Greg
 
J

JE McGimpsey

For the first question, take a look at the arguments for MsgBox in
XL/VBA Help:
MsgBox Function

Displays a message in a dialog box, waits for the user to click a button, and
returns an Integer indicating which button the user clicked.
Syntax
MsgBox(prompt[, buttons] [, title] [, helpfile, context])

For your second question, one way:

MsgBox "First line." & vbNewLine & "Second line."
 
Top