| |
mbouchard
Posts: 1916
Score: 16
Joined: 5/15/2003
From: USA
Status: offline
|
I have never really used arrays before (Need to remedy that) but this is something that I threw together. It will only read 2 seperate arrays and pop out a message box for each line in the array but it is a start. If I have time this weekend I will look at it some more, just need to figure out how to write each line to a new file. Mike Const ForReading = 1, ForWriting = 2 Set fso = CreateObject("Scripting.FileSystemObject") Set MyFile1 = fso.OpenTextFile("C:\File1.txt", ForReading) Set MyFile2 = fso.OpenTextFile("C:\file2.txt", ForReading) ReadMyFile1 = MyFile1.ReadAll ReadMyFile2 = MyFile2.ReadAll Array1 = Split(ReadMyFile1, vbcrlf) Array2 = Split(ReadMyFile2, vbcrlf) For j = 0 To UBound(Array1) Msgbox Array1(j) Next For k = 0 To UBound(Array2) Msgbox Array2(k) Next
|
|