Thread: Message Box
View Single Post
 
Old 02-25-2012, 06:42 PM
Colin Legg's Avatar
Colin Legg Colin Legg is offline Windows 7 32bit Office 2010 32bit
Expert
 
Join Date: Jan 2011
Location: UK
Posts: 369
Colin Legg will become famous soon enough
Default

To start a new line in the message box you can use carriage return/linefeed characters. I tend to use vbNewLine:
Code:
MsgBox "hello" & vbNewLine & "the" & vbNewLine & "world!"
For more information on vbNewLine, have a look in the VBA helpfile.


To make part of the message content bold or format the size and colour, you have two choices.
(1) Use some very complicated API calls
(2) Instead of using the built-in messagebox, create your own userform to display the message.

Option (2) is very simple and is the one I recommend. It would also be easy to have a table on your userform.
Reply With Quote