Hello JVLennox,
You don't mention what error you're getting, but I suspect that sPos i
returning a zero at some point during the file read. If you have line
in the file that don't contain the search string " - - ", sPos will b
zero. Place a breakpoint at this line in your code:
sKdNr = KdNrSuchen(Mid(sText, 1, sPos - 1))
Check the value sPos and then press F5 to step through your loop.
Sincerely,
Leith Ros
--
Leith Ros
-----------------------------------------------------------------------
Leith Ross's Profile:
http://www.excelforum.com/member.php...fo&userid=1846
View this thread:
http://www.excelforum.com/showthread.php?threadid=56350