Ok....clear
You need to read the text file into array line my line
and then split the lines by width and position
Sub testww()
Close #1
Dim strArray() As String
Dim i As Integer
Dim strpathfile As String
Erase strArray
strpathfile = "c:\testfixed.txt"
Open strpathfile For Input As #1
strArray = Split(Input(LOF(1), 1), vbCrLf)
Close #1
For i = 0 To UBound(strArray)
Sheets(1).Cells(i + 1, 1).Value = Left$(strArray(i), 10)
Sheets(1).Cells(i + 1, 2).Value = Mid$(strArray(i), 11, 15)
Sheets(1).Cells(i + 1, 3).Value = Mid$(strArray(i), 26, 10)
Next i
End Sub
Bookmarks