Results 1 to 5 of 5

Thread: [RESOLVED] consolidating an array

  1. #1

    Thread Starter
    Addicted Member seditives's Avatar
    Join Date
    Jan 2011
    Location
    South of England
    Posts
    151

    Resolved [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

    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
    Attached Files Attached Files

  2. #2
    Frenzied Member Jmacp's Avatar
    Join Date
    Jul 2003
    Location
    UK
    Posts
    1,959

    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?

  3. #3

    Thread Starter
    Addicted Member seditives's Avatar
    Join Date
    Jan 2011
    Location
    South of England
    Posts
    151

    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..

  4. #4
    Only Slightly Obsessive jemidiah's Avatar
    Join Date
    Apr 2002
    Posts
    2,431

    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.
    The time you enjoy wasting is not wasted time.
    Bertrand Russell

    <- Remember to rate posts you find helpful.

  5. #5

    Thread Starter
    Addicted Member seditives's Avatar
    Join Date
    Jan 2011
    Location
    South of England
    Posts
    151

    Re: consolidating an array

    Quote Originally Posted by jemidiah View Post
    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 lol Thanks I see what I can do

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width