Results 1 to 3 of 3

Thread: Editing a text file

  1. #1

    Thread Starter
    Member
    Join Date
    Aug 1999
    Location
    Ohio
    Posts
    59
    I have a fixed field length ASCII file that I need to modify specific areas within the file (say line 2 position 4-10, line 3 position 13-19, etc).

    I want to have a form that shows the data from the above mentioned lines in their own textbox, then allow the user to change the data in the textbox then save the file.

    So, the only thing that would change in the file would be line 2 position 4-10 and line 3 postion 13-19.

    What is the best way to do this? Anyone have sample code to get me started?

    Thanks.

  2. #2
    Lively Member
    Join Date
    Jan 1999
    Location
    Oshawa, Ontario, Canada
    Posts
    88
    if you want a certain spot in a file you could just load the whole text file into a string variable and use the
    left(variable, character#) or right(variable, character#) procedure.....
    -|Kn|gHt|
    MSN - [email protected]

  3. #3
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    You may want to split it by vbNewline so you know what line you are working in without counting every character to get to the right line.

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