Hi, Adam ,
the basic code for doing so might look like this (you may need to alter the separator to suit your needs as I picked semicolon here):
Sub EF982969()
Dim strFile As String
Dim strPath As String
Dim ws As Worksheet
Dim lngCol As Long
Application.ScreenUpdating = False
strPath = "C:\Temp\My Files\" 'change to your drive and folder
If Right(strPath, 1) <> "/" Then
strPath = strPath & "\"
End If
Set ws = ThisWorkbook.Sheets("DATA")
strFile = Dir(strPath & "*.rpt")
Do While strFile <> ""
lngCol = ws.Cells(1, Columns.Count).End(xlToLeft).col + 1
Workbooks.OpenText _
Filename:=strPath & strFile, _
DataType:=xlDelimited, _
semicolon:=True
ActiveSheet.UsedRange.Copy ws.Cells(1, lngCol)
Application.CutCopyMode = False
ActiveWorkbook.Close False
strFile = Dir()
Loop
Application.ScreenUpdating = True
Set ws = Nothing
End Sub
Ciao,
Holger
Bookmarks