View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Dave Parker Dave Parker is offline
external usenet poster
 
Posts: 2
Default Modifying text files with VBA?

I have two (ASCII) text files (FileA and FileB), and I need to replace
a portion of FileA with the contents of FileB. The position of the
text in the files is fixed - I just need to replace lines 274-326 in
FileA with lines 1-53 of FileB.

I've tried a subroutine that reads both files to a workbook, merges
the required portion, then saves a text formatted file. However,
portions of the files are space delimited and others are comma
delimited so this method doesn't work properly. I think I need to
directly access and modify the files from VBA (of course, I'm open to
other suggestions).

Thank you for any help you can provide.
Dave