I noticed in vb 2008, you can right click a text box, and in that menu it says, "Text" or something of that variation. You can paste all of the text right there, and your program will start with that text in it.

I was wondering if there was a way to get rich text (alot of text) into a rtb in vb6. Going to text in the properties bar and pasting doesn't work. It only pastes one line to it.

Another question.

I have a listbox, and it has a list of events. Each event has a lot of text. I want, when you click one of the events, to have it display all of that text to textbox1 say. Is there a way to do that, so that I copy all of that text into the listbox so when you click it it copies it to the textbox? I tried doing

private Sub List2_Click()
Select Case List2.ListIndex
Case "0" Text1.Text = "1st line of about 200" & vbNewLine & "2nd Line of about 200"

I've tried pasting all of the text I need to appear under the Case "0"

but it reads it as like a code, and errors (in red).

Thanks in advance.

Firstly, try -

Case Is = 0
Text1.Text = ......

Secondly, I think by using the rich textbox is the way to go because you are limited to the amounty of text a text box can take. a Rich text box is almost unlimited. MS Word uses rich text boxes as their pages.

You can use the same code as above to populate the rich text box with text.

1.
      Case "0" Text1.Text = "1st line of about 200" & vbNewLine & "2nd Line of about 200"

Thanks, but I've already tried that. It works, but I have to use &vbNewLine& and that takes to long.

I put your code in, and the Text1.Text = turns red and it doesn't work.

Your code is incorrect.:)

Select Case List1.ListIndex

Case Is = 0
Text1.Text = "1st line of about 200" & vbCRLF & "2nd Line of about 200"
End Select
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.