Arkadaşlar aşağıdaki kod yardımyla TXT dosyalarından veri çekebiliyorum ama bazı veriler arasında boşluk oluşuyor çekilen karakterler arası boşluk olmaması için kodu nasıl düzeltebiliriz?
Sub veri_al()
Cells.ClearContents
Range("A1").Select
b = Application.GetOpenFilename
If b = False Then
Exit Sub
End If
i = 1
Open Dir(b) For Input As #1
Do While Not EOF(1)
Line Input #1, a
Cells(i, 1).Value = WorksheetFunction.Trim(WorksheetFunction.Substitute(Mid(a, 1, 30), Chr$(9), ""))
i = i + 1
Loop
Close
End Sub
Sub veri_al()
Cells.ClearContents
Range("A1").Select
b = Application.GetOpenFilename
If b = False Then
Exit Sub
End If
i = 1
Open Dir(b) For Input As #1
Do While Not EOF(1)
Line Input #1, a
Cells(i, 1).Value = WorksheetFunction.Trim(WorksheetFunction.Substitute(Mid(a, 1, 30), Chr$(9), ""))
i = i + 1
Loop
Close
End Sub
