I need to import 2 files. First "File1"into the sheet 2 and second "File2" into the sheet 3. Both files are in the same folder. When I'm using following code for first file it works. I'm using this code also for the second file (of course for destination... instead of sheet2 there is always sheet3), but always import the first file in the folder. When I separate files into different folder, it works and I can import both files correctly. Do you have any idea how can be it solved?

Sub choose_NEWfiles_for_comparison()

Application.ScreenUpdating = False
      
    Dim FilesToOpen
    Dim sDelimiter As String
    Dim FirstRow As Long

    sDelimiter = " "
    
    FilesToOpen = Application.GetOpenFilename _
      (FileFilter:="Text Files (*.dat), *.dat", _
      Title:="Choose NEW File")

    If TypeName(FilesToOpen) = "Boolean" Then
        MsgBox "No Files were selected"
    End If

 sName = Dir(sPath & "*.dat")
    
FirstRow = Range("A" & Rows.Count).End(xlUp).row
  
        With ActiveSheet.QueryTables.Add(Connection:= _
            "TEXT;" & sPath & sName, Destination:=Sheet2.Cells(FirstRow, "A"))
            .Name = Left(sName, Len(sName) - 4)
            .FieldNames = True
            .RowNumbers = False
            .FillAdjacentFormulas = False
            .PreserveFormatting = True
            .RefreshOnFileOpen = False
            .RefreshStyle = xlInsertDeleteCells
            .SavePassword = False
            .SaveData = True
            .AdjustColumnWidth = True
            .RefreshPeriod = 0
            .TextFilePromptOnRefresh = False
            .TextFilePlatform = xlWindows
            .TextFileStartRow = 10
            .TextFileParseType = xlDelimited
            .TextFileTextQualifier = xlTextQualifierNone
            .TextFileConsecutiveDelimiter = True
            .TextFileTabDelimiter = True
            .TextFileSemicolonDelimiter = False
            .TextFileCommaDelimiter = False
            .TextFileSpaceDelimiter = True
            .TextFileOtherDelimiter = " "
            .TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, _
               1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
               1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
               1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
            .TextFileTrailingMinusNumbers = True
            .Refresh BackgroundQuery:=False
            
        End With

End Sub