Message box question
-
-
Hi! I would like to know if there is a way to 1) center your message in a message box 2) move down a line in the box (have part of the message on the first line, and a second part on the next) Thanks, any help would be breatly appreciated! Erin
- I do not believe that there are any settings to center the text in your message box. 2) You can add a newline character to your message to make the message skip to the next line. The newline is the chr(10) command. You can also add chr(9) in order to do a tab sequence.
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life! -
Hi! I would like to know if there is a way to 1) center your message in a message box 2) move down a line in the box (have part of the message on the first line, and a second part on the next) Thanks, any help would be breatly appreciated! Erin
In your string add CHR$(13) where you want the line to break. "line 1"+CHR$(13)+"line 2" There may be a newer syntax these days. As for centering, do you want each line centered or the overall message. If it is just the message, I believe centering is automatic. Don't know how to center each line.
-
- I do not believe that there are any settings to center the text in your message box. 2) You can add a newline character to your message to make the message skip to the next line. The newline is the chr(10) command. You can also add chr(9) in order to do a tab sequence.
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!kilowatt wrote: The newline is the chr(10) command 10 is line feed. I'd suggest a combination of 13 [carriage return] and 10 [line feed] Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
-
kilowatt wrote: The newline is the chr(10) command 10 is line feed. I'd suggest a combination of 13 [carriage return] and 10 [line feed] Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
-
Hi! I would like to know if there is a way to 1) center your message in a message box 2) move down a line in the box (have part of the message on the first line, and a second part on the next) Thanks, any help would be breatly appreciated! Erin
-
Anonymous wrote: In the properties window under justification click center The
MsgBox
doesn't contain properties like you are talking about. Nick Parker -
In your string add CHR$(13) where you want the line to break. "line 1"+CHR$(13)+"line 2" There may be a newer syntax these days. As for centering, do you want each line centered or the overall message. If it is just the message, I believe centering is automatic. Don't know how to center each line.
Anonymous wrote: There may be a newer syntax these days. "Line 1" & vbCrLf & "line 2"
-
kilowatt wrote: The newline is the chr(10) command 10 is line feed. I'd suggest a combination of 13 [carriage return] and 10 [line feed] Nish
Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.
Just for your information, the message box and other window controls that display text ignore the carraige return, and since you need to type this in VB to get a carraige return: & chr(13) & I suggest to not use it at all. You do need a carraige return when you are dealing with files though.
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life!