Maybe something like this, which does the following...
1) Creates a new workbook with a single worksheet.
1) Opens each CSV file from the specified folder.
2) For each CSV file, it creates a new worksheet, names this new worksheet after the CSV file, and copies the data to this new worksheet.
3) Closes each CSV file.
4) Deletes the original worksheet from the newly created workbook.
Code:
[FONT=Verdana][COLOR=darkblue]Option[/COLOR] [COLOR=darkblue]Explicit[/COLOR]
[COLOR=darkblue]Sub[/COLOR] test()
[COLOR=darkblue]Dim[/COLOR] wkbDest [COLOR=darkblue]As[/COLOR] Workbook
[COLOR=darkblue]Dim[/COLOR] wksDest [COLOR=darkblue]As[/COLOR] Worksheet
[COLOR=darkblue]Dim[/COLOR] strPath [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]String[/COLOR]
[COLOR=darkblue]Dim[/COLOR] strFile [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]String[/COLOR]
[COLOR=darkblue]Dim[/COLOR] strData [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]String[/COLOR]
[COLOR=darkblue]Dim[/COLOR] x [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]Variant[/COLOR]
[COLOR=darkblue]Dim[/COLOR] Cnt [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]Long[/COLOR]
[COLOR=darkblue]Dim[/COLOR] r [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]Long[/COLOR]
[COLOR=darkblue]Dim[/COLOR] c [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]Long[/COLOR]
[COLOR=darkblue]Dim[/COLOR] i [COLOR=darkblue]As[/COLOR] [COLOR=darkblue]Long[/COLOR]
Application.ScreenUpdating = [COLOR=darkblue]False[/COLOR]
strPath = "C:\Temp\"
[COLOR=darkblue]If[/COLOR] Right(strPath, 1) <> "\" [COLOR=darkblue]Then[/COLOR] strPath = strPath & "\"
strFile = Dir(strPath & "*.csv")
[COLOR=darkblue]Do[/COLOR] [COLOR=darkblue]While[/COLOR] Len(strFile) > 0
Cnt = Cnt + 1
[COLOR=darkblue]If[/COLOR] Cnt = 1 [COLOR=darkblue]Then[/COLOR]
[COLOR=darkblue]Set[/COLOR] wkbDest = Workbooks.Add(xlWBATWorksheet)
[COLOR=darkblue]End[/COLOR] [COLOR=darkblue]If[/COLOR]
[COLOR=darkblue]Open[/COLOR] strPath & strFile [COLOR=darkblue]For[/COLOR] [COLOR=darkblue]Input[/COLOR] [COLOR=darkblue]As[/COLOR] #1
[COLOR=darkblue]Set[/COLOR] wksDest = wkbDest.Worksheets.Add
wksDest.Name = Left(strFile, InStr(1, strFile, ".csv") - 1)
r = 2
c = 1
[COLOR=darkblue]Do[/COLOR] [COLOR=darkblue]Until[/COLOR] EOF(1)
Line [COLOR=darkblue]Input[/COLOR] #1, strData
x = Split(strData, ",")
[COLOR=darkblue]For[/COLOR] i = [COLOR=darkblue]LBound[/COLOR](x) [COLOR=darkblue]To[/COLOR] [COLOR=darkblue]UBound[/COLOR](x)
Cells(r, c).Value = x(i)
c = c + 1
[COLOR=darkblue]Next[/COLOR] i
r = r + 1
c = 1
[COLOR=darkblue]Loop[/COLOR]
[COLOR=darkblue]Close[/COLOR] #1
strFile = Dir
[COLOR=darkblue]Loop[/COLOR]
[COLOR=darkblue]If[/COLOR] Cnt > 0 [COLOR=darkblue]Then[/COLOR]
Application.DisplayAlerts = [COLOR=darkblue]False[/COLOR]
wkbDest.Worksheets(wkbDest.Worksheets.Count).Delete
Application.DisplayAlerts = [COLOR=darkblue]True[/COLOR]
Application.ScreenUpdating = [COLOR=darkblue]True[/COLOR]
MsgBox "Completed...", vbInformation
[COLOR=darkblue]Else[/COLOR]
Application.ScreenUpdating = [COLOR=darkblue]True[/COLOR]
MsgBox "No CSV files found...", vbExclamation
[COLOR=darkblue]End[/COLOR] [COLOR=darkblue]If[/COLOR]
[COLOR=darkblue]End[/COLOR] [COLOR=darkblue]Sub[/COLOR]
[/FONT]