positionSuchbegriff = 0
positionSeriennummer = 0
iFile = FreeFile
sFile = "D:\Martin_Meitinger\Versionen_TXT\" & File.Name
sSearchSuchbegriff = Sheets(
"Tabelle1"
).Cells(4, 2)
sSearchSeriennummer = Sheets(
"Tabelle1"
).Cells(8, 2)
maschinenname = File.Name
Open sFile
For
Input
As
iFile
Do
Until
EOF(1)
Input #iFile, sTxt
positionSuchbegriff = InStr(positionSuchbegriff + Len(sSearchSuchbegriff), sTxt, sSearchSuchbegriff)
If
positionSuchbegriff
Then
Do
Until
EOF(1)
Input #iFile, sTxt
positionSeriennummer = InStr(positionSeriennummer + Len(sSearchSeriennummer), sTxt, sSearchSeriennummer)
If
positionSeriennummer
Then
i = i + 1
Sheets(
"Tabelle1"
).Cells(11 + i, 1) = maschinenname
Exit
Do
End
If
Loop
End
If
Loop
Close iFile