Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > File I/O and Registry > Printing to a file


Reply
 
Thread Tools Display Modes
  #1  
Old 09-11-2003, 10:45 AM
Doubleface Doubleface is offline
Regular
 
Join Date: Aug 2003
Location: Lithuania
Posts: 66
Question Printing to a file


Hi,

i have a txtbox and two listboxes in a form. i want to add the listbox content to the textbox. E.g

listbox1: name1, name2, name3, ...
listbox2: 1,5,10,7,6,4,...

the textbox should look like this:

name1 1 5 10 7 6 4 ...

how to do that?
Reply With Quote
  #2  
Old 09-11-2003, 11:10 AM
zak2zak's Avatar
zak2zak zak2zak is offline
Contributor
 
Join Date: Jul 2003
Location: Singapore
Posts: 686
Lightbulb May i comment

May be this helps...
Not so clear but i'll try?
Code:
Private Sub List1_Click() Dim i As Integer Dim sText As String For i = 0 To List2.ListCount -1 sText = sText & List2.List(i) & " " Next i Text1.Text = List1.Text & Trim$(sText) End Sub
__________________
I May Have Interpret It wrongly
Correct me..if I misunderstood U.
Hope This helps........and Enjoy Coding........//


zak2zak
Reply With Quote
  #3  
Old 09-11-2003, 11:26 AM
Doubleface Doubleface is offline
Regular
 
Join Date: Aug 2003
Location: Lithuania
Posts: 66
Default

thanks, i'll try if it works and what does trim$ mean?
Reply With Quote
  #4  
Old 09-11-2003, 11:33 AM
zak2zak's Avatar
zak2zak zak2zak is offline
Contributor
 
Join Date: Jul 2003
Location: Singapore
Posts: 686
Lightbulb May i comment

May be this helps...
Trim$() is to clear excess Space in the beginning or end of a string.
__________________
I May Have Interpret It wrongly
Correct me..if I misunderstood U.
Hope This helps........and Enjoy Coding........//


zak2zak
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Installation Problem - PLs help urgenlty dpdsouza Installation / Documentation 4 12-02-2004 07:09 PM
Doesn't want to register! MikeyM Installation / Documentation 5 03-02-2003 08:22 PM
making music continue GrimViper General 3 05-01-2001 10:40 AM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->