Results 1 to 3 of 3

Thread: Data Files Please Help!!!!

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    2

    Smile

    Hello everyone,

    I am working on a lab. I have created a data file, Products.txt. I need to load the info from Products into an array, mProducts. How can I ccomplish that?
    Any ideas or any help you could offer would be greatly appreciated. Thanks!!
    ~Angel~

  2. #2
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    <?>

    get you started.

    Dim myFile as string, myVar as string
    myFile = "C:\Products.txt"
    dim intNum as integer, i as integer
    intnum = freefile
    dim mProducts()

    open myfile for input as intnum
    while not eof(intnum)
    redim preserve mProducts(i)
    line input #intnum, myVar
    mProducts(i) = myVar
    loop
    Close #intnum

    'to check it out add a list box and run this

    for i = lbound(mProducts) to Ubound(mProducts)
    list1.additem mProducts(i)
    next i
    "A myth is not the succession of individual images,
    but an integerated meaningful entity,
    reflecting a distinct aspect of the real world."

    ___ Adolf Jensen

  3. #3

    Thread Starter
    New Member
    Join Date
    Dec 2000
    Posts
    2

    Data Files

    I appreciate the last reply I recieved but it did not work...
    Maybe I did something wrong. Any further assistance you could offer I would really appreciate!
    Thanks!
    ~Angel~

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