Sub importieren()
Dim strFilename As String
Dim Pfad$
Dim dtmFaktDatum As Date
Dim lngBankBCNR As String
Dim strBankName As String
Dim strBankOrt As String
Dim lngI As Long 'Zähler
DIm LetzteZeile&
   
strFilename = Application.GetOpenFilename("alle dateien (*.), *.")
If strFilename <> "Falsch" Then
zeile = 4
    With ActiveSheet 
        LetzteZeile=.cells(1,1).end(xldown).row
        with .QueryTables.Add(Connection:="TEXT;" & strFilename, Destination:=.cells(letztezeile+1,1)
            .Name = "MBS"
            .FieldNames = True
            .RowNumbers = False
            .FillAdjacentFormulas = False
            .PreserveFormatting = True
            .RefreshOnFileOpen = False
            .RefreshStyle = xlInsertDeleteCells
            .SavePassword = False
            .SaveData = True
            .AdjustColumnWidth = True
            .RefreshPeriod = 0
            .TextFilePromptOnRefresh = False
            .TextFilePlatform = 28592
            .TextFileStartRow = 1
            .TextFileParseType = xlDelimited
            .TextFileTextQualifier = xlTextQualifierDoubleQuote
            .TextFileConsecutiveDelimiter = False
            .TextFileTabDelimiter = True
            .TextFileSemicolonDelimiter = True
            .TextFileCommaDelimiter = False
            .TextFileSpaceDelimiter = False
            .TextFileColumnDataTypes = Array(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 If
End Sub
	  
     |