Computing.Net > Forums > Programming > Visual Basic newbie

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.

Visual Basic newbie

Reply to Message Icon

Name: Travis
Date: December 26, 2002 at 21:13:51 Pacific
OS: WinME
CPU/Ram: 198MB
Comment:

Hi i am a VB newbie and need help in this :
How do i display more than 1 line of text using a single variable?
i.e
'Dialog display
dialogmsg = "Programmed by xx"

and i want a second line like "Ver 1.0a" without declaring another variable like dialogmsg2.



Sponsored Link
Ads by Google

Response Number 1
Name: Madman
Date: December 26, 2002 at 21:57:21 Pacific
Reply:

dialogmsg="Programmed by xx" & chr$(10) & chr$(10) & "Ver 1.0a"


0

Response Number 2
Name: Travis
Date: December 26, 2002 at 22:11:01 Pacific
Reply:

what does the syntax mean? Thanks!


0

Response Number 3
Name: Madman
Date: December 27, 2002 at 06:59:01 Pacific
Reply:

Maybe if I had expressed it this way it would have made more sense:

dialogmsg="Programmed by xx" & vbCrLf & vbCrLf & "Ver 1.0a"

The vbCrLf inserts a carriage return and line feed at the end of "Programmed by xx", causing the following text to be displayed on the line following the line feed. In the above text you would have 2 blank lines between your two desired lines of text. To have just one blank line, remove one of the vbCrLf code.

Hope this helps.

Happy New Years!



0

Response Number 4
Name: GameTroy
Date: December 27, 2002 at 16:59:18 Pacific
Reply:

hey this should work for vb5, and vb6.

String = "first" + vbcrlf + "second"

and when this gets displayed in a multi-line text box it looks like this.

first
second

...
this should work. it works for me at least.



0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


HTML (CSS?) include state... How to make my own popup ...



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: Visual Basic newbie

Visual Basic help www.computing.net/answers/programming/visual-basic-help/7258.html

Visual Basic copy command? www.computing.net/answers/programming/visual-basic-copy-command/15232.html

Simple log-in screen Visual Basic www.computing.net/answers/programming/simple-login-screen-visual-basic/6331.html