1 Attachment(s)
[RESOLVED] consolidating an array
I have an array taking data from three separte .txt files. So how do I code it so that it collects all of the data from one .txt file :confused::thumb:
Becuase this is a little obscure I have attached the program for you to look at and possibly have a go and fixing or at least give me some advise. Thanks:bigyello:
Re: consolidating an array
You mean use one text file for all data instead of three?
How is the data being entered into each text file at the moment, if manually you could say something like,
**1**
Joe Blogss
**2**
0800 800 800
**3**
dd//mm//yy
Then you the split function, or maybe you need to keep the datas format the same as it is now in each text file?
Re: consolidating an array
have you looked at the program becuase your see what I mean. sorry I am not got at explaining and I am a VB6 newbie so yer..
Re: consolidating an array
Just make your own file format, eg.
Code:
John Lemon
2/3/1993
023 8054 9584
Arcthricolive ben
5/9/1992
023 8047 3293
You can then Line Input to get each line and do whatever you want with the resulting strings. There are many minor variations on this method. In an ideal world, you would probably just use XML, but I don't think it's worthwhile for you right now.
Also, often times the first line of a text file like you have lists the number of records, so you can ReDim once and be done.
Re: consolidating an array
Quote:
Originally Posted by
jemidiah
Just make your own file format, eg.
Code:
John Lemon
2/3/1993
023 8054 9584
Arcthricolive ben
5/9/1992
023 8047 3293
You can then Line Input to get each line and do whatever you want with the resulting strings. There are many minor variations on this method. In an ideal world, you would probably just use XML, but I don't think it's worthwhile for you right now.
Also, often times the first line of a text file like you have lists the number of records, so you can ReDim once and be done.
Ops I forgot about the stupid names :p lol Thanks I see what I can do