We help IT Professionals succeed at work.

How do I read a text file with variable length records in VB6?

seckel
seckel asked
on
Medium Priority
354 Views
Last Modified: 2012-05-04
I have a text file that is generated from MS-DOS. I need a VB program to read each record the text file.  The problem is that the text file contains variable length records.  How do I read a text file with variable length records?

Please show example...
Comment
Watch Question

Author

Commented:
I would like to read each record randomly, but I dont know how to get length of each record...
Is there any separator in between like any char or by CR?
Commented:
Unlock this solution and get a sample of our free trial.
(No credit card required)
UNLOCK SOLUTION

Commented:
replace this line

for i=0 to ubound(arr)-1

to

for i=0 to ubound(arr)
Unlock the solution to this question.
Thanks for using Experts Exchange.

Please provide your email to receive a sample view!

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.