Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi Leith, Here's a belated thanks! I solved it in a very similar way. Here's my code for posterity Dim FinalFile As Integer Dim PreFile As Integer Dim PreName(1 To 25) As String Dim FinalName(1 To 25) As String Dim fso As Object Dim Temp As String FinalName(numberofwafermaps) = WafermapPath & ERsheetname(I) & ".txt" PreName(numberofwafermaps) = WafermapPath & ERsheetname(I) & "-pre.txt" FinalFile = FreeFile() Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FileExists(FinalName(numberofwafermaps))) Then Kill FinalName(numberofwafermaps) End If Close #FinalFile Open FinalName(numberofwafermaps) For Append As FinalFile Print #FinalFile, "Mesh AutoCreate" PreFile = FreeFile() Open PreName(numberofwafermaps) For Input As PreFile ' Do While Not EOF(PreFile) Line Input #PreFile, Temp Print #FinalFile, Temp Loop 'CloseFiles: ' ' ' Close the destination file and the source file. Close #PreFile Close #FinalFile If (fso.FileExists(PreName(numberofwafermaps))) Then Kill PreName(numberofwafermaps) End If -- lif ------------------------------------------------------------------------ lif's Profile: http://www.excelforum.com/member.php...o&userid=35745 View this thread: http://www.excelforum.com/showthread...hreadid=563543 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Reading a text file line by line | Excel Programming | |||
Reading a text file line by line | Excel Programming | |||
import huge text file line-by-line? | Excel Programming | |||
appending data from an external text file | Excel Programming | |||
Appending to File | Excel Programming |