It would most likely be due to that. The sample you provided only had short URLs so we didn't anticipate much longer strings.
I assume the text file isn't changed often so it would be easier to edit that to split any of overly long lines by adding a paragraph mark in a logical location than it would be to add complexity to the vba code.
I would expect the maximum string length to be something around a power of 2 eg 64, 128 or 256 characters. You can hover your mouse over the Len(sFind) to see how big the unacceptable number is.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|