Sub Macro340()
'------------------
'by Cacho Rodríguez
'------------------
Dim mPath$, iniCell$, i&, LR&, Vec, j%, iniTime!, R%
iniCell = "$E$1"
iniTime = Timer
mPath = ThisWorkbook.Path & "\Txt\"
With CreateObject("Scripting.FileSystemObject")
On Error Resume Next: .GetFolder(mPath).Delete True: On Error GoTo 0
.GetFolder(ThisWorkbook.Path).subFolders.Add "Txt"
End With
LR = Cells(Rows.Count, Range(iniCell).Column).End(xlUp).Row
For i = Range(iniCell).Row To LR Step 100
Vec = Cells(i, Range(iniCell).Column).Resize(100)
R = 1 + R
Open mPath & Format(R, "0000") & ".txt" For Output As #1
For j = 1 To 100
If Vec(j, 1) = "" Then Exit For
Write #1, Vec(j, 1)
Next
Close
Next
MsgBox "Proceso terminado en: " & Format(Timer - iniTime, "0.00 seg")
End Sub