Try ReadLine.Length as Len() might be returning the bytes required to store the variable instead of characters.
Main Topics
Browse All TopicsI am reading in a file containing records of variable length ... some of which are quite long (over 4096 characters). For these records, I am wishing to handle differently than those that are less than 4096 characters in length. The problem is with the Len(). It is not yielding the correct length for me on these long records. I am attaching code and input file.
Thanks in advance. Brad.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
I (see note) determined that the problem was with the line of VB code ... Input #SourceNum, ReadLine
The VB line of code should be ... Line Input #SourceNum, ReadLine
This reads the entire line in.
When using Input #SourceNum, ReadLine ... it uses any comma in the line as an end-of-record situation.
My text has commas all over the place.
NOTE: Sorry Technofile.
Credit would go to Idle_Mind from Question w/ Title: Title:
VB6 Input command problem with commas.
I do appreciate the time, in any case.
Thanks again. Brad.
Business Accounts
Answer for Membership
by: bhindbjorgenPosted on 2009-09-02 at 08:36:41ID: 25242186
Raising Points to 500. I didn't think that the answer would be so difficult, but maybe it is.
Anybody have any ideas whatsoever?
Brad