Computing.Net > Forums > Programming > How do you skip lines in msgbox VB

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

How do you skip lines in msgbox VB

Reply to Message Icon

Name: o
Date: October 11, 2002 at 14:22:27 Pacific
OS: 256
CPU/Ram: 60
Comment:

How do you skip lines in a message box in VB 6.0? I heard it was vbCr & vbLf, but I tried it and did not work, don't know if I used it properly. Here's what I typed:

result = MsgBox("Please enter number of adult and child tickets required Both FIELDS MUST BE COMPLETED vbCr & vbLf If tickets not required, enter 0", vbOKOnly + vbInformation, "Date Entry Required")

I need to skip lines in places where they have "vbCr & vbLf" placed in between two words. Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: CJ
Date: October 11, 2002 at 14:26:57 Pacific
Reply:

result = MsgBox("Please enter number of adult and child tickets required Both FIELDS MUST BE COMPLETED " & vbLf & "If tickets not required, enter 0", vbOKOnly + vbInformation, "Date Entry Required")

Try that It will give you a line feed.


0

Response Number 2
Name: Critter
Date: October 11, 2002 at 14:29:52 Pacific
Reply:

Your syntax was just a little off... try this:

result = MsgBox("Please enter number of adult and child tickets required Both FIELDS MUST BE COMPLETED" & vbCr & vbLf & "If tickets not required, enter 0", vbOKOnly + vbInformation, "Date Entry Required")

You had the vbCr and vbLf inside the quotes and they were being treated as part of the string.


0

Response Number 3
Name: danny
Date: October 11, 2002 at 18:06:55 Pacific
Reply:

if you want both, VB6 allows "vbCrLf" also, (instead of joining the two others)


0

Response Number 4
Name: Manish
Date: October 13, 2002 at 11:37:40 Pacific
Reply:

I just give u a better option ....
just try using chr(13) in b/w lines 13 is the character code for the Enter key.
Example:
msgbox ("The Value of goods ammounts to :" &chr(13) & "$500"


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: How do you skip lines in msgbox VB

how do use call function in java like C www.computing.net/answers/programming/how-do-use-call-function-in-java-like-c/951.html

How do you get flash? www.computing.net/answers/programming/how-do-you-get-flash/16013.html

HTML-- how do you make frames invisible? www.computing.net/answers/programming/html-how-do-you-make-frames-invisible/458.html