Hi,
I have Ascii text files that have many lines(more than 50,000). I want to open the ASCII text File, and for every 2000 lines create a new file, with a sequential name. I am stuck
Here's where I am so far:
Open "C:\test\index.txt" For Input As #1
Do Until EOF(1)
Line Input #1, Data
For i = 0 to 2000
Open "C:\test\" & i & ".txt" For Append As #2
Print #2, Data
Next i
Close #2
Loop
Close #1
Obviously the above code, just places each line from the input file 2000 times, into a new file. Im stuck and don't know where to include the loop..Can someone please help me.
I have Ascii text files that have many lines(more than 50,000). I want to open the ASCII text File, and for every 2000 lines create a new file, with a sequential name. I am stuck
Here's where I am so far:
Open "C:\test\index.txt" For Input As #1
Do Until EOF(1)
Line Input #1, Data
For i = 0 to 2000
Open "C:\test\" & i & ".txt" For Append As #2
Print #2, Data
Next i
Close #2
Loop
Close #1
Obviously the above code, just places each line from the input file 2000 times, into a new file. Im stuck and don't know where to include the loop..Can someone please help me.