Guys,
After several hours of ‘googling’, my hopes are on you for solving my VBA csv-import problem. The problem is the following:
I’m trying to import several semicolon separated .csv files in one Excel worksheet (multiple tabs). The import works fine, but the separation in different columns doesn’t go well. The most solutions I found work fine for one csv file, but don’t work in my code:
![]()
Sub csv() Dim oWbk As Workbook Dim sFil As String Dim sPath As String sPath = "C:\ \csv\" 'location of files ChDir sPath sFil = Dir("*.csv") 'all csv-files in the folder have to be imported Do While sFil <> "" ‘starts LOOP until all files in folder sPath have been looped through Set oWbk = Workbooks.Open(sPath & "\" & sFil) 'opens the file oWbk.Close True 'close the workbook, saving changes sFil = Dir Loop ' End of LOOP End Sub
Who can help me out? Your advice is truly appreciated!
Ivo
Bookmarks