Message Box Font Size

Taff

Registered User.
Local time
Today, 21:52
Joined
Feb 3, 2004
Messages
158
Hi All,

Is it possible to change the Font Size of the text displayed in a message box?

Thanks

Ant
 
No, and (because a lot of people ask) you can't colour them either or customise them beyond the icon they display and the buttons they allow.

Most who need further functionality from a message box will use a form to simulate a message box.
 
Thanks Mile-O-Phile.
 
About the only thing you can do with the text is you can bold the top line [section] of your message box using the EVAL function and the @ symbol. Ensure you keep the single quotes and @ exactly like my example. This will work for all versions of Access.

If (Eval("MsgBox ('Your Bold Text Here.@Your Normal Text Here.@@',20,' Your Title Here')")) = vbYes Then
MsgBox "user clicked YES"
Else
MsgBox "user clicked NO"
End If

You will have to play with the aurgument numbers [20] if you need a different symbol and/or buttons.

HTH
 
ghudson said:
You will have to play with the aurgument numbers [20] if you need a different symbol and/or buttons.

I think its always better to use the Access constants provided as its easier for people to read (vbExlamamation, vbQuestion, vbCritical, vbInformation) the number these enumerations point to.

Even better to make your own Public Constants in a module that tie all your possible combinations together.

Code:
Public Const mbQuestion = vbQuestion + vbYesNo
Public Const mbConfirm = vbExclamation + vbOkCancel

which can then be used:

Code:
MsgBox "Do you think?", mbQuestion, "Philosophy"
 

Users who are viewing this thread

Back
Top Bottom