Pfad angeben
juergen
Die Datei die Importiert werden soll steht auf dem Tabellenblatt mails in Zelle A1.
l = Worksheets("mails").[a1]
Der Pfad der vervollständigt weden soll.
"TEXT;C:\Users\PCS\AppData\Local\Microsoft\Windows Live Mail\Jürgenweb.de\Lotto\& l" _
, Destination:=Range("$A$1"))
Hier ist der Code der nicht funktioniert.
Sub emailimport()
' emailimport Makro
Dim l As Integer
l = Worksheets("mails").[a1]
Sheets("import").Select
Cells.Select
Selection.QueryTable.Delete
Selection.ClearContents
Range("A1").Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Users\PCS\AppData\Local\Microsoft\Windows Live Mail\Jürgenweb.de\Lotto\& l" _
, Destination:=Range("$A$1"))
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 1252
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub
Wie kann man den ändern das er geht.Mfg
Jürgen Link