Solved

Easy String Question

Posted on 2000-04-01
5
152 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
  • 2
  • 2
5 Comments
 
LVL 6

Expert Comment

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

Accepted Solution

by:
mfclaes earned 15 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

948 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now