Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format MsgBox Text

Status
Not open for further replies.
Feb 2, 2005
42
US
Does anyone know how to format the Text inside of a message box? I'd like the second line of text to be centered

MsgBox("You are about to delete Claims Transaction Summary Report records"&Chr(13)&Chr(13)&"Click Yes to continue", vbYesNo, "Delete Claims Transaction Summary Report records?")

Any help is appreciated
 
THere are no formatting features of this type for a msgbox.

You will have to do it yourself using spaces or else design your own message box form.
 
There is more formatting available in message boxes than many people know. It's not customizable, but perhaps what's already there could be suitable for someone's needs:

Access 2003 Help - MsgBox said:
You can use the MsgBox action to create a formatted error message similar to built-in error messages displayed by Access. The MsgBox action(function) permits you to supply a message in three sections for the Message argument. You separate the sections with the "@" character.

The following example displays a formatted message box with a sectioned message. The first section of text in the message is displayed as a bold heading. The second section is displayed as plain text beneath that heading. The third section is displayed as plain text beneath the second section, with a blank line between them.

Enter the following in the Message argument:

Wrong button!@This button doesn't work.@Try another.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top