|
-
Sep 12th, 2010, 07:21 PM
#1
Thread Starter
New Member
[RESOLVED]Join 2 lines of string, but start the 2nd on a new line...
I want to join 2 lines of string and then have the 2nd one start on a new line.
ex.
Text1 = Line1
Text2 = Line2
Text1 + Text2 = Line1Line2
i want to make it
Text1 + Text2 = Line1
Line2
Last edited by timbowman1; Sep 12th, 2010 at 07:39 PM.
-
Sep 12th, 2010, 07:44 PM
#2
Re: [RESOLVED]Join 2 lines of string, but start the 2nd on a new line...
Interesting. Resolved with 0 replies. So, how did you solve it on your own?
-
Sep 12th, 2010, 07:48 PM
#3
Thread Starter
New Member
Re: [RESOLVED]Join 2 lines of string, but start the 2nd on a new line...
I just kept trying different things.. i had to add vbCrLf & _ before the new line
I have another question, though
-
Sep 12th, 2010, 08:16 PM
#4
Re: [RESOLVED]Join 2 lines of string, but start the 2nd on a new line...
Use & when doing string concatenation instead of +
String concatenation will just join the two strings, that's why you get "Line1Line2", if you want something in the middle, you have to code for it. For example
Text1.Text & " " & Text2.Text >>> will give you "Line1 Line2"
You can similarly insert a vbNewLine character in between to get the result you wanted.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|