Can i center my wordings in a message box? If there is a way, how do i do so?
Printable View
Can i center my wordings in a message box? If there is a way, how do i do so?
i presume you are talking about short messages. Normally the MSgBox's with is adapted to the lengt of the message, with a minimum with for the buttons.
If your message is short u can try and add spaces or to the message. this will only work if the message isnt variable
remvs
It is possible, even with variables, but you need to cleverly code it together.
If you are that serious, find out how many characters can be displayed in a message box on a single line. That will be the max length of a line for your code. Any string that crosses this limit will have to be broken up into more than one string and be joined with a vbCrLf.
Each individual line will be padded to the left and right so that the length of the resultant string is equal to the max length.
Display the strings concatenated with vbCrLfs in the message box.
Ask back if you find any of the above stuff difficult.
.