Center text in a Msgbox

djh

Registered User.
Local time
Today, 14:05
Joined
Jul 19, 2000
Messages
16
My msgboxes are showing up all funky when the text exceeds one line. What's the center property for msgboxes? (vbYesNoCancel).

Thanks!
 
Not quite sure what you want but you can include line spaces in your msgbox prompt by using the carriage return key. This is represented by using (Chr(13)).

e.g MsgBox("Your message" & (Chr(13)) & "rest of your message".
 
There is no center-option (horizontically) for MsgBoxes - what a pity!
 
You'd have to create your own form that looks like a messagebox, where you can centre text, then open it from a custom function (which you could then call in much the same way as using the MsgBox)

Mike

[This message has been edited by Mike Gurman (edited 08-21-2000).]
 
Thanks again Robert!

Your prevous post to this subject suggested to use (Chr (13)). I was trying to figure how to use that. Access help did not say you have to add the "&" sign between the character code.

My message box has two lines now. As suggested;
**************************
MsgBox "My Text" & (Char (13)) & "Next Line Text"
*****************************************
 

Users who are viewing this thread

Back
Top Bottom