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!

Customized Messages in MessageBox 1

Status
Not open for further replies.
Jan 24, 2002
33
CA
Hello everyone,

I have created a table with a list of Error Numbers and Error Descriptions in order to avoid having to rewrite error messages. I call the error message found in a text field using a function similar to MsgBox. Sometimes, the error description is quite long and I want to be able to include tabs and carriage returns within the text field.
Right now, my MessageBox function understands the whole field as a string and doesn't recognize vbTab and vbCrLf. Is there something I can do to make the function understand them as vbTab and vbCrLf?

Thanks,
Lawrence
 
Did you try "vbNewLine" ?
[tt]"Message Part1" & vbNewLine & "Message Part2"[/tt]

________________________________________________________
Zameer Abdulla
Help to find Missing people
There’s a world of difference between editorials and advertorials
 
If vbTab and vbCrLf are written as string literal inside the error description field you may consider the Replace function:
strFormattedText = Replace(Replace(strErrDescription, "vbTab", vbTab), "vbCrLf", vbCrLf)

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top