Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with the ReadLine method please

Status
Not open for further replies.

ukleaf

Programmer
Mar 16, 2004
27
GB
Hi guys, could someone point me in the right direction please?

I have 2 list boxes, the first one (lstFullFileContents) contains all lines within a specific file.

I would then like to extract a certain line, in this case always line 5 from that list box to another (lstListBox1)...

Getting lstFullFileContents to show all the lines isn't hard,

Dim line As String
line = sr.ReadLine()
lstFileFullContents(line)

I thought there would be a copy command I could use maybe... but the only one I could find copies the whole list box contents...

Any ideas please?

Many thanks.
 
Doesn't have your ListBox a Column property ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi there PHV,

not sure if I know what you mean, the list box has only the one column?

I need to extract line 5 from one list box to another.

Many thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top