Hi,
versuche diesen Code:
Sub Michael8000()
With Application
.DisplayAlerts = False
.ScreenUpdating = False
End With
sPath = "z:\test\" '<<<<<<<<<<<<<<< anpassen
sFile = Dir(sPath & "michael vba*.txt") 'Name anpassen, z.B "*.txt"
Do While Len(sFile)
With Sheets.Add(, , , sPath & sFile)
ls = Sheets("Daten").Cells(1, Columns.Count).End(xlToLeft).Column + 1
.Columns(1).Copy Sheets("Daten").Cells(1, ls)
.Delete
End With
sFile = Dir
Loop
With Application
.DisplayAlerts = True
.ScreenUpdating = True
End With
End Sub
|