I have listbox, see the attach files, I want to show in the textbox like this.. when I click at the command button.
[Code] & vbCrLf & [N] & vbCrLf & [name]
Printable View
I have listbox, see the attach files, I want to show in the textbox like this.. when I click at the command button.
[Code] & vbCrLf & [N] & vbCrLf & [name]
You need a simple loop. E. g.:Code:Dim n As Long
For n = 0 To List1.ListCount - 1
Text1.Text = Text1.Text & List1.List(n)
If n <> List1.ListCount - 1 Then Text1.Text = Text1.Text & vbCrLf
Next n
I don't want to add new line.. I just want in one line. For your infor I want to show the text vbCrlf in the my textbox.. Not add new line. I can' do that
If n <> ListBox2.ListCount - 1 Then TextBox7.Text = TextBox7.Text & " vbCrLf"
follow the same code what gavio gave in
http://www.vbforums.com/showpost.php...06&postcount=7
and replace
If n <> List1.ListCount - 1 Then Text1.Text = Text1.Text & ", "
with
If n <> List1.ListCount - 1 Then Text1.Text = Text1.Text & " & vbCrLf & "