[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

Easy String Question

Posted on 2000-04-01
5
Medium Priority
?
160 Views
Last Modified: 2010-05-02
How do I add a return (next line) to a string"

Eg:
"Text1" (string)
"Text2" (string)
Combine some how, and get
"Text1
Text2"
0
Comment
Question by:aomega
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

by:hatem72
ID: 2676686
MsgBox "Text1" + Chr(10) + "Text2"
0
 

Accepted Solution

by:
mfclaes earned 60 total points
ID: 2676691
Hi,

I don't know if this is what you want

just open a new project, add a form and a textbox named text, and past the following code


Private Sub Form_Load()
    Dim Text1 As String
    Dim Text2 As String
    Dim result As String
    Text1 = "first line"
    Text2 = "second line"
    result = Text1 & vbCrLf & Text2
    Text.Text = result
End Sub

regards

0
 

Author Comment

by:aomega
ID: 2676694
Sorry, I'm planning to send it to RTB so that won't work.

Text1 & vbCrLf & Text2
might work,, so I'm trying it now.
0
 

Author Comment

by:aomega
ID: 2676695
Oh, he got it too...
Well it works, thanks.
0
 
LVL 6

Expert Comment

by:hatem72
ID: 2676704
Sory what the RTB ???
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question