Sub subRemovetop12Rows()
Dim fIn, fOut, strTemp,fHeaderOut
fIn = "c:\data.txt"
fOut = "c:\dataout.txt"
fHeaderOut = "c:\dataHeaderOut.txt"
Open fIn For Input As #1
Open fOut For Output As #2
Open fHeaderOut For Output As #3
Do While Not EOF(1)
i = i + 1
Input #1, strTemp
If i > 12 Then
Print #2, strTemp
Else
'You might want to parse the header somehow here
Print #3, strTemp
End If
Loop
Close #1
Close #2
Close #3
End Sub
|