Import Multiple CSV Files into a Single MS Excel Spreadsheet

The following routine reads multiple (potentially hundreds) of comma-separated-value files (CSV) and writes their content to a single MS Excel worksheet.

Original reference from

Sub ImportCSVsWithReference()
' This macro reads in all CSV files in a directory and 
' writes them to a single new worksheet ("Sheet1")
' in a new workbook (that is, the workbook in which this 
' Macro is defined).
' The data from the separate CSV files are column-listed in' the Sheet1.
' Found at this web site:
' Developed in this Macro 2018-01-08
' John Zaleski
' -------------------------------------------
' What follows is directly from the web site:
' UpdatebyKutoolsforExcel 2015-12-14
    Dim xSht  As Worksheet
    Dim xWb As Workbook
    Dim xStrPath As String
    Dim xFileDialog As FileDialog
    Dim xFile As String
    On Error GoTo ErrHandler
    Set xFileDialog = Application.FileDialog(msoFileDialogFolderPicker)
    xFileDialog.AllowMultiSelect = False
    xFileDialog.Title = "Select a folder"
    If xFileDialog.Show = -1 Then
        xStrPath = xFileDialog.SelectedItems(1)
    End If
    If xStrPath = "" Then Exit Sub
    Set xSht = ThisWorkbook.ActiveSheet
    If MsgBox("Clear the existing sheet before importing?", vbYesNo, "Kutools for Excel") = vbYes Then xSht.UsedRange.Clear
    Application.ScreenUpdating = False
    xFile = Dir(xStrPath & "\" & "*.csv")
    Do While xFile <> ""
        Set xWb = Workbooks.Open(xStrPath & "\" & xFile)
        Columns(1).Insert xlShiftToRight
        Columns(1).SpecialCells(xlBlanks).Value = _
        ActiveSheet.UsedRange.Copy xSht.Range("A" _
           & Rows.Count).End(xlUp).Offset(1)
        xWb.Close False
        xFile = Dir
    Application.ScreenUpdating = True
    Exit Sub
    MsgBox "no files csv", , "Kutools for Excel"
End Sub