txt. import
02.10.2003 14:47:02
Heiko F.
Hallo Excelfreunde ,
habe folgendes Modul in der recherche gefunden
Sub TextImport()
Dim iRow As Integer, iCol As Integer
Dim sFile As String, sTxt As String
sFile = Range("P1").Value
If Dir(sFile) = "" Then
Beep
MsgBox "Datei wurde nicht gefunden!"
Exit Sub
End If
iRow = 1
iCol = 1
Close
Open sFile For Input As #1
Do Until EOF(1)
Line Input #1, sTxt
Do While InStr(sTxt, ";")
Cells(iRow, iCol).Value = Left(sTxt, InStr(sTxt, ";") - 1)
sTxt = Right(sTxt, Len(sTxt) - InStr(sTxt, ";"))
iCol = iCol + 1
Loop
Cells(iRow, iCol).Value = sTxt
iRow = iRow + 1
iCol = 1
Loop
Close
End Sub
es funkt. super , aber leider brauche ich nicht die ganze txt-DAtei , sonden nur
die Spalte c7 bis c2886 .
Diese muß in der xls-Datei in F9-F2888 kopiert werden.
Wer kann mir helfen , wie kann man das Modul ändern ?
Vielen Dank schonmal.
Heiko