Solved

File with delimiters in VB6

Posted on 2009-05-12
2
224 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
VB error "Type mismatch" 2 50
MsgBox 2 47
Saving history changes to sub form 4 36
vb6 - Transfer from MSHFlexgrid1 to xls issue 8 47
Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

896 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

12 Experts available now in Live!

Get 1:1 Help Now