Solved

File with delimiters in VB6

Posted on 2009-05-12
2
223 Views
Last Modified: 2013-11-25
Hi
I am reading a file into VB6 which is in a very disorganised format of:

AD01         xxxxxxxx                            xxxxxxxxx                                        xxxxx        xxxxxxxxxxxxx             AD02xxxxxxxxxxxxxx xxxxxxx                                             xxxxxxxx AD03                                                        xxxxxxxxxxxxxxxxxxxxxxxxx  ... AD30 xxxxxxxx

where AD?? are the delimiters for pieces of data.  The data may have leading white spaces, white spaces in the middle of the data, and trailing white spaces. I need to remove the leading and trailing whitespaces and replace any interim whitespaces with a single space The data in each field is of arbitrary length and can be over multiple lines.

I would like to read in the file and split up the data into managable chunks to be displayed in corresponding text boxes in the new single white space format.

as an aside if someone could tell me if it is possible to make the text boxes automatically produce a vertical scrollbar should the text be longer than the text box that would be brilliant too.

Any help or pointers would be very much appreciated.

Thanks in advance
0
Comment
Question by:viralss
2 Comments
 
LVL 3

Accepted Solution

by:
mpeaden2 earned 500 total points
ID: 24370389
0
 

Author Comment

by:viralss
ID: 24383356
excellent, that did the job with a little effort!
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now