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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.openTextFile problem - please help!!!

Status
Not open for further replies.

chriscj21

Technical User
Mar 27, 2004
246
0
0
GB
All:

Having an issue...

I have a .csv file I need to read from this and go to a certain line based on upser input....


Using the .readline (or any other method) - is there any a way I can gp tp a certain line?


Please help!!!


Many thanks


ChrisCj21
MCSE, A+, N+
 
Take a look at the AtEndOfStream property and at how to do loops in VBS.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks PHV

I am familiar with loops and atend of stream.....My code current splis each coloum of my CSV using ",", each instance is stored in my array....

I want a user to be able to enter lets say an id number and then that will tally up with a row in my CSV....

Loop wise all I can do is use the readline and then have a counter that adds "1" once it has read each line....

Still not sure how this will allow me to get to a certain line tho.







ChrisCj21
MCSE, A+, N+
 
You could read the entire thing with the ReadAll method and then use the Split() function to push it into an array and then use the UBound() function to find the last element of the array...
 
cheers sheco...

I will give this a go


ChrisCj21
MCSE, A+, N+
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top